 +   _db_lock_recurse_count--;
 +   if (!_db_lock_recurse_count) {
 +      _db_lock_jobid = 0;
-+      _db_lock_time = 0;
-+      memset(0, _db_lock_threadid, sizeof(_db_lock_threadid));
++      memset(&_db_lock_threadid, 0, sizeof(_db_lock_threadid));
 +   }
 +}
 +
  /*
   * Lock database, this can be called multiple times by the same
   *   thread without blocking, but must be unlocked the number of
-@@ -324,6 +352,7 @@
+@@ -324,6 +354,7 @@
        e_msg(file, line, M_FATAL, 0, "rwl_writelock failure. stat=%d: ERR=%s\n",
             errstat, be.bstrerror(errstat));
     }

 }
 
 /*
@@ -334,6 +363,7 @@
 void _db_unlock(const char *file, int line, B_DB *mdb)
 {
    int errstat;

       e_msg(file, line, M_FATAL, 0, "rwl_writeunlock failure. stat=%d: ERR=%s\n",
Index: src/lib/message.c
===================================================================
--- src/lib/message.c	(révision 7981)
+++ src/lib/message.c	(copie de travail)
@@ -62,6 +62,25 @@
 FILE *con_fd = NULL;                  /* Console file descriptor */
 brwlock_t con_lock;                   /* Console lock structure */
 
