summaryrefslogtreecommitdiffstats
path: root/source4/lib/messaging/messaging.c
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2014-07-17 14:50:33 +0000
committerVolker Lendecke <vl@samba.org>2014-07-21 18:00:10 +0200
commitfe79d759dafef12af26da0a866969100c4aa065b (patch)
treeed8bb46066760c47da7f33c2ee9db2b1af46ca1a /source4/lib/messaging/messaging.c
parente64359ceb77142856bdd32187f377cfc0fc51674 (diff)
downloadsamba-fe79d759dafef12af26da0a866969100c4aa065b.tar.gz
samba-fe79d759dafef12af26da0a866969100c4aa065b.tar.xz
samba-fe79d759dafef12af26da0a866969100c4aa065b.zip
messaging4: Remove unnecessary locking
We don't do any modifying operations on the database, so locking is not needed here Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
Diffstat (limited to 'source4/lib/messaging/messaging.c')
-rw-r--r--source4/lib/messaging/messaging.c6
1 files changed, 0 insertions, 6 deletions
diff --git a/source4/lib/messaging/messaging.c b/source4/lib/messaging/messaging.c
index 19a20c471c..7c05e5291d 100644
--- a/source4/lib/messaging/messaging.c
+++ b/source4/lib/messaging/messaging.c
@@ -960,18 +960,13 @@ struct server_id *irpc_servers_byname(struct imessaging_context *msg_ctx,
int count, i;
struct server_id *ret;
- if (tdb_lock_bystring(t->tdb, name) != 0) {
- return NULL;
- }
rec = tdb_fetch_bystring(t->tdb, name);
if (rec.dptr == NULL) {
- tdb_unlock_bystring(t->tdb, name);
return NULL;
}
count = rec.dsize / sizeof(struct server_id);
ret = talloc_array(mem_ctx, struct server_id, count+1);
if (ret == NULL) {
- tdb_unlock_bystring(t->tdb, name);
return NULL;
}
for (i=0;i<count;i++) {
@@ -979,7 +974,6 @@ struct server_id *irpc_servers_byname(struct imessaging_context *msg_ctx,
}
server_id_set_disconnected(&ret[i]);
free(rec.dptr);
- tdb_unlock_bystring(t->tdb, name);
return ret;
}