s4-nbt_server: remove unused winsdb_get_seqnumber()
authorAndrew Bartlett <abartlet@samba.org>
Thu, 9 Feb 2012 00:25:58 +0000 (11:25 +1100)
committerAndrew Bartlett <abartlet@samba.org>
Fri, 10 Feb 2012 07:21:41 +0000 (08:21 +0100)
Found by callcatcher: http://www.skynet.ie/~caolan/Packages/callcatcher.html

Andrew Bartlett

Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Fri Feb 10 08:21:41 CET 2012 on sn-devel-104

source4/nbt_server/wins/winsdb.c

index 18c1b725be84c6ec9085de1a49f1323421421d27..346ccc949bb6bdb34f9c36cbcf14183461ee8203 100644 (file)
@@ -124,32 +124,6 @@ failed:
        return 0;
 }
 
-uint64_t winsdb_get_seqnumber(struct winsdb_handle *h)
-{
-       int ret;
-       struct ldb_context *ldb = h->ldb;
-       struct ldb_dn *dn;
-       struct ldb_result *res = NULL;
-       TALLOC_CTX *tmp_ctx = talloc_new(ldb);
-       uint64_t seqnumber = 0;
-
-       dn = ldb_dn_new(tmp_ctx, ldb, "@BASEINFO");
-       if (!dn) goto failed;
-
-       /* find the record in the WINS database */
-       ret = ldb_search(ldb, tmp_ctx, &res, dn, LDB_SCOPE_BASE, NULL, NULL);
-       if (ret != LDB_SUCCESS) goto failed;
-       if (res->count > 1) goto failed;
-
-       if (res->count == 1) {
-               seqnumber = ldb_msg_find_attr_as_uint64(res->msgs[0], "sequenceNumber", 0);
-       }
-
-failed:
-       talloc_free(tmp_ctx);
-       return seqnumber;
-}
-
 /*
   return a DN for a nbt_name
 */