From: Kern Sibbald Date: Thu, 3 Jul 2008 15:09:49 +0000 (+0000) Subject: Release main control rwlock if ABORTing. X-Git-Tag: Release-2.4.1~18 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=3a18f20863b23c7fc3358db6487c5e8e59c5834a;p=bacula%2Fbacula Release main control rwlock if ABORTing. git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/branches/Branch-2.4@7299 91ce42f0-d328-0410-95d8-f526ca767f89 --- diff --git a/bacula/src/lib/rwlock.c b/bacula/src/lib/rwlock.c index 692f02d2c6..e78216cf68 100644 --- a/bacula/src/lib/rwlock.c +++ b/bacula/src/lib/rwlock.c @@ -1,7 +1,7 @@ /* Bacula® - The Network Backup Solution - Copyright (C) 2001-2007 Free Software Foundation Europe e.V. + Copyright (C) 2001-2008 Free Software Foundation Europe e.V. The main author of Bacula is Kern Sibbald, with contributions from many others, a complete list can be found in the file AUTHORS. @@ -294,11 +294,13 @@ int rwl_writeunlock(brwlock_t *rwl) return stat; } if (rwl->w_active <= 0) { - Emsg0(M_ABORT, 0, _("rwl_writeunlock called too many times.\n")); + pthread_mutex_unlock(&rwl->mutex); + Jmsg0(NULL, M_ABORT, 0, _("rwl_writeunlock called too many times.\n")); } rwl->w_active--; if (!pthread_equal(pthread_self(), rwl->writer_id)) { - Emsg0(M_ABORT, 0, _("rwl_writeunlock by non-owner.\n")); + pthread_mutex_unlock(&rwl->mutex); + Jmsg0(NULL, M_ABORT, 0, _("rwl_writeunlock by non-owner.\n")); } if (rwl->w_active > 0) { stat = 0; /* writers still active */ diff --git a/bacula/technotes-2.4 b/bacula/technotes-2.4 index c4038e1980..7f463bb4f1 100644 --- a/bacula/technotes-2.4 +++ b/bacula/technotes-2.4 @@ -2,6 +2,7 @@ General: 03Jul08 +kes Release main control rwlock if ABORTing. kes Make watchdog connect timeout queue messages rather than sending directly to avoid lock conflicts with the real thread. kes Remove const char that causes problems with Python, which has