]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/stored/job.c
ebl Fix a bug in read_close_session which return random status
[bacula/bacula] / bacula / src / stored / job.c
index 8215000b83d5eb756a89e38062457dd4249e665d..a0454fd97b5ca41e6f4de6e3287d4d1804aac0f2 100644 (file)
@@ -177,7 +177,7 @@ bool run_cmd(JCR *jcr)
     *  expires.
     */
    P(mutex);
-   for ( ;!job_canceled(jcr); ) {
+   for ( ; !job_canceled(jcr); ) {
       errstat = pthread_cond_timedwait(&jcr->job_start_wait, &mutex, &timeout);
       if (errstat == 0 || errstat == ETIMEDOUT) {
          break;
@@ -265,7 +265,7 @@ bool query_cmd(JCR *jcr)
       unbash_spaces(dev_name);
       foreach_res(device, R_DEVICE) {
          /* Find resource, and make sure we were able to open it */
-         if (fnmatch(dev_name.c_str(), device->hdr.name, 0) == 0) {
+         if (strcmp(dev_name.c_str(), device->hdr.name) == 0) {
             if (!device->dev) {
                device->dev = init_dev(jcr, device);
             }
@@ -283,7 +283,7 @@ bool query_cmd(JCR *jcr)
       }
       foreach_res(changer, R_AUTOCHANGER) {
          /* Find resource, and make sure we were able to open it */
-         if (fnmatch(dev_name.c_str(), changer->hdr.name, 0) == 0) {
+         if (strcmp(dev_name.c_str(), changer->hdr.name) == 0) {
             if (!changer->device || changer->device->size() == 0) {
                continue;              /* no devices */
             }