summaryrefslogtreecommitdiff
path: root/source4/nbt_server
diff options
context:
space:
mode:
authorSimo Sorce <idra@samba.org>2005-02-27 11:35:47 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:10:55 -0500
commitb1b14817eaa6e6579596d54166e17bc8d5605c01 (patch)
treeb1af59838a0337dd52b510374b048255397dfe24 /source4/nbt_server
parentd2dc86994e7075490f95faa1cc85008feb38f04a (diff)
downloadsamba-b1b14817eaa6e6579596d54166e17bc8d5605c01.tar.gz
samba-b1b14817eaa6e6579596d54166e17bc8d5605c01.tar.bz2
samba-b1b14817eaa6e6579596d54166e17bc8d5605c01.zip
r5585: LDB interfaces change:
changes: - ldb_wrap disappears from code and become a private structure of db_wrap.c thanks to our move to talloc in ldb code, we do not need to expose it anymore - removal of ldb_close() function form the code thanks to our move to talloc in ldb code, we do not need it anymore use talloc_free() to close and free an ldb database - some minor updates to ldb modules code to cope with the change and fix some bugs I found out during the process (This used to be commit d58be9e74b786a11a57e89df36081d55730dfe0a)
Diffstat (limited to 'source4/nbt_server')
-rw-r--r--source4/nbt_server/wins/winsdb.c12
-rw-r--r--source4/nbt_server/wins/winsdb.h2
2 files changed, 7 insertions, 7 deletions
diff --git a/source4/nbt_server/wins/winsdb.c b/source4/nbt_server/wins/winsdb.c
index 4b547bc644..f2156af1c2 100644
--- a/source4/nbt_server/wins/winsdb.c
+++ b/source4/nbt_server/wins/winsdb.c
@@ -33,7 +33,7 @@
static BOOL winsdb_save_version(struct wins_server *winssrv)
{
int i, ret = 0;
- struct ldb_context *ldb = winssrv->wins_db->ldb;
+ struct ldb_context *ldb = winssrv->wins_db;
struct ldb_message *msg = ldb_msg_new(winssrv);
if (msg == NULL) goto failed;
@@ -101,7 +101,7 @@ struct winsdb_record *winsdb_load(struct wins_server *winssrv,
if (expr == NULL) goto failed;
/* find the record in the WINS database */
- ret = ldb_search(winssrv->wins_db->ldb, NULL, LDB_SCOPE_ONELEVEL, expr, NULL, &res);
+ ret = ldb_search(winssrv->wins_db, NULL, LDB_SCOPE_ONELEVEL, expr, NULL, &res);
if (res != NULL) {
talloc_steal(tmp_ctx, res);
}
@@ -155,7 +155,7 @@ static struct ldb_message *winsdb_message(struct wins_server *winssrv,
struct winsdb_record *rec, TALLOC_CTX *mem_ctx)
{
int i, ret=0;
- struct ldb_context *ldb = winssrv->wins_db->ldb;
+ struct ldb_context *ldb = winssrv->wins_db;
struct ldb_message *msg = ldb_msg_new(mem_ctx);
if (msg == NULL) goto failed;
@@ -183,7 +183,7 @@ failed:
*/
uint8_t winsdb_add(struct wins_server *winssrv, struct winsdb_record *rec)
{
- struct ldb_context *ldb = winssrv->wins_db->ldb;
+ struct ldb_context *ldb = winssrv->wins_db;
struct ldb_message *msg;
TALLOC_CTX *tmp_ctx = talloc_new(winssrv);
int ret;
@@ -210,7 +210,7 @@ failed:
*/
uint8_t winsdb_modify(struct wins_server *winssrv, struct winsdb_record *rec)
{
- struct ldb_context *ldb = winssrv->wins_db->ldb;
+ struct ldb_context *ldb = winssrv->wins_db;
struct ldb_message *msg;
TALLOC_CTX *tmp_ctx = talloc_new(winssrv);
int ret;
@@ -243,7 +243,7 @@ failed:
*/
uint8_t winsdb_delete(struct wins_server *winssrv, struct winsdb_record *rec)
{
- struct ldb_context *ldb = winssrv->wins_db->ldb;
+ struct ldb_context *ldb = winssrv->wins_db;
TALLOC_CTX *tmp_ctx = talloc_new(winssrv);
int ret;
const char *dn;
diff --git a/source4/nbt_server/wins/winsdb.h b/source4/nbt_server/wins/winsdb.h
index 6d395461c6..454bef3e3b 100644
--- a/source4/nbt_server/wins/winsdb.h
+++ b/source4/nbt_server/wins/winsdb.h
@@ -40,7 +40,7 @@ struct winsdb_record {
struct wins_server {
/* wins server database handle */
- struct ldb_wrap *wins_db;
+ struct ldb_context *wins_db;
uint32_t min_ttl;
uint32_t max_ttl;