dbwrap: Allow dbwrap_record_watch_recv to not lock the record
authorVolker Lendecke <vl@samba.org>
Fri, 26 Apr 2013 13:12:05 +0000 (15:12 +0200)
committerJeremy Allison <jra@samba.org>
Fri, 26 Apr 2013 22:17:23 +0000 (15:17 -0700)
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/lib/dbwrap/dbwrap_watch.c

index d8f1b74a42c7765537a9653c0e5be2fe88972938..7bdcd998f89c6326147c7a433784f75164eca0b6 100644 (file)
@@ -401,6 +401,9 @@ NTSTATUS dbwrap_record_watch_recv(struct tevent_req *req,
        if (tevent_req_is_nterror(req, &status)) {
                return status;
        }
+       if (prec == NULL) {
+               return NT_STATUS_OK;
+       }
        rec = dbwrap_fetch_locked(state->db, mem_ctx, state->key);
        if (rec == NULL) {
                return NT_STATUS_INTERNAL_DB_ERROR;