]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/stored/dircmd.c
ebl Fix a bug in read_close_session which return random status
[bacula/bacula] / bacula / src / stored / dircmd.c
index cb99f95bef94cf7dc2f099c2bd62012eb7955163..205fe140df3566000f74e09f5e30d77ebe67efa3 100644 (file)
@@ -563,7 +563,7 @@ static DCR *find_device(JCR *jcr, POOL_MEM &devname, int drive)
    unbash_spaces(devname);
    foreach_res(device, R_DEVICE) {
       /* Find resource, and make sure we were able to open it */
-      if (fnmatch(device->hdr.name, devname.c_str(), 0) == 0) {
+      if (strcmp(device->hdr.name, devname.c_str()) == 0) {
          if (!device->dev) {
             device->dev = init_dev(jcr, device);
          }
@@ -581,7 +581,7 @@ static DCR *find_device(JCR *jcr, POOL_MEM &devname, int drive)
    if (!found) {
       foreach_res(changer, R_AUTOCHANGER) {
          /* Find resource, and make sure we were able to open it */
-         if (fnmatch(devname.c_str(), changer->hdr.name, 0) == 0) {
+         if (strcmp(devname.c_str(), changer->hdr.name) == 0) {
             /* Try each device in this AutoChanger */
             foreach_alist(device, changer->device) {
                Dmsg1(100, "Try changer device %s\n", device->hdr.name);