Revert "HACK debug g_lock del store"
authorStefan Metzmacher <metze@samba.org>
Sat, 20 Jan 2018 18:05:08 +0000 (19:05 +0100)
committerStefan Metzmacher <metze@samba.org>
Tue, 29 Oct 2019 13:33:03 +0000 (14:33 +0100)
This reverts commit ef68cdd6f081d57fc6e635559a01d941962735ca.

source3/lib/g_lock.c

index 4cd900c036297bf7b38a634a0e2947b547aaa2e7..74f7073dbfc9c009c1efe7ede20c1a05ec88213f 100644 (file)
@@ -108,15 +108,6 @@ static void g_lock_rec_del(struct g_lock *lck, size_t i)
        lck->num_recs -= 1;
        if (i < lck->num_recs) {
                uint8_t *recptr = lck->recsbuf + i*G_LOCK_REC_LENGTH;
-               struct g_lock_rec rec;
-               struct server_id_buf tmp;
-
-               g_lock_rec_get(&rec, recptr);
-               DBG_ERR("%s: i[%zu] pid[%s] type[%u]\n",
-                       __location__, i,
-                       server_id_str_buf(rec.pid, &tmp),
-                       (unsigned)rec.lock_type);
-
                memcpy(recptr, lck->recsbuf + lck->num_recs*G_LOCK_REC_LENGTH,
                       G_LOCK_REC_LENGTH);
        }
@@ -127,7 +118,7 @@ static NTSTATUS g_lock_store(struct db_record *rec, struct g_lock *lck,
 {
        uint8_t sizebuf[4];
        uint8_t addbuf[G_LOCK_REC_LENGTH];
-       size_t i;
+
        struct TDB_DATA dbufs[] = {
                { .dptr = sizebuf, .dsize = sizeof(sizebuf) },
                { .dptr = lck->recsbuf,
@@ -136,27 +127,9 @@ static NTSTATUS g_lock_store(struct db_record *rec, struct g_lock *lck,
                { .dptr = lck->data, .dsize = lck->datalen }
        };
 
-       for (i=0; i < lck->num_recs; i++) {
-               uint8_t *recptr = lck->recsbuf + i*G_LOCK_REC_LENGTH;
-               struct g_lock_rec _rec;
-               struct server_id_buf tmp;
-
-               g_lock_rec_get(&_rec, recptr);
-               DBG_ERR("%s: i[%zu] pid[%s] type[%u]\n",
-                       __location__, i,
-                       server_id_str_buf(_rec.pid, &tmp),
-                       (unsigned)_rec.lock_type);
-       }
-
        if (add != NULL) {
-               struct server_id_buf tmp;
                g_lock_rec_put(addbuf, *add);
 
-               DBG_ERR("%s: ia[%zu] pid[%s] type[%u]\n",
-                       __location__, lck->num_recs,
-                       server_id_str_buf(add->pid, &tmp),
-                       (unsigned)add->lock_type);
-
                dbufs[2] = (TDB_DATA) {
                        .dptr = addbuf, .dsize = G_LOCK_REC_LENGTH
                };
@@ -164,8 +137,6 @@ static NTSTATUS g_lock_store(struct db_record *rec, struct g_lock *lck,
                lck->num_recs += 1;
        }
 
-               DBG_ERR("%s: num_recs[%zu]\n",
-                       __location__, lck->num_recs);
        SIVAL(sizebuf, 0, lck->num_recs);
 
        return dbwrap_record_storev(rec, dbufs, ARRAY_SIZE(dbufs), 0);
@@ -245,12 +216,6 @@ static NTSTATUS g_lock_trylock(struct db_record *rec, struct server_id self,
        NTSTATUS status;
        bool modified = false;
        bool ok;
-       struct server_id_buf tmp;
-
-       DBG_ERR("%s: self[%s] type[%u]\n",
-               __location__,
-               server_id_str_buf(self, &tmp),
-               (unsigned)type);
 
        data = dbwrap_record_get_value(rec);
 
@@ -375,13 +340,6 @@ done:
                        status = store_status;
                }
        }
-
-       DBG_ERR("%s: self[%s] type[%u] => modified[%u] %s\n",
-               __location__,
-               server_id_str_buf(self, &tmp),
-               (unsigned)type, modified,
-               nt_errstr(status));
-
        return status;
 }