]> git.sur5r.net Git - bacula/bacula/commitdiff
Change W/G to Wanted/Granted in lock dump
authorEric Bollengier <eric@eb.homelinux.org>
Sun, 25 Oct 2009 14:16:40 +0000 (15:16 +0100)
committerEric Bollengier <eric@eb.homelinux.org>
Sun, 25 Oct 2009 14:16:40 +0000 (15:16 +0100)
bacula/src/lib/lockmgr.c

index d035e24e8a6c56da08827a38db908adabdee4932..f300419146489c43251922e3def0a982b576d01a 100644 (file)
@@ -246,10 +246,11 @@ public:
       fprintf(fp, "threadid=%p max=%i current=%i\n", 
               (void *)thread_id, max, current);
       for(int i=0; i<=current; i++) {
-         fprintf(fp, "   lock=%p state=%c %s:%i\n", 
-               lock_list[i].lock, lock_list[i].state,
-               lock_list[i].file, lock_list[i].line);
-      }
+         fprintf(fp, "   lock=%p state=%s %s:%i\n", 
+                 lock_list[i].lock, 
+                 (lock_list[i].state=='W')?"Wanted ":"Granted",
+                 lock_list[i].file, lock_list[i].line);
+      } 
    }
 
    void dump(FILE *fp) {