summaryrefslogtreecommitdiff
path: root/source3/lib/messages.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2003-03-20 00:51:41 +0000
committerJeremy Allison <jra@samba.org>2003-03-20 00:51:41 +0000
commitc8eed69be0850e7c68318562c91f73855a09dd92 (patch)
tree900e9791c3c38d9378c77236f802c96f8c791f8b /source3/lib/messages.c
parent2f13a74671c62a2861979ce2ab33ad1363bdbcf7 (diff)
downloadsamba-c8eed69be0850e7c68318562c91f73855a09dd92.tar.gz
samba-c8eed69be0850e7c68318562c91f73855a09dd92.tar.bz2
samba-c8eed69be0850e7c68318562c91f73855a09dd92.zip
lib/messages.c: Check return from chainlock before modifying message queue.
Apply the job returned limit across all requests for job queues. Jeremy. (This used to be commit dee1326a1d8a0bf8977df22a0fe014dd5d8dc769)
Diffstat (limited to 'source3/lib/messages.c')
-rw-r--r--source3/lib/messages.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/source3/lib/messages.c b/source3/lib/messages.c
index 5ff0e45c61..c078472880 100644
--- a/source3/lib/messages.c
+++ b/source3/lib/messages.c
@@ -315,7 +315,9 @@ static BOOL retrieve_all_messages(char **msgs_buf, size_t *total_len)
kbuf = message_key_pid(sys_getpid());
- tdb_chainlock(tdb, kbuf);
+ if (tdb_chainlock(tdb, kbuf) == -1)
+ return False;
+
dbuf = tdb_fetch(tdb, kbuf);
/*
* Replace with an empty record to keep the allocated