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>
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++) {
}
server_id_set_disconnected(&ret[i]);
free(rec.dptr);
- tdb_unlock_bystring(t->tdb, name);
return ret;
}