diff options
author | Stefan Metzmacher <metze@samba.org> | 2005-10-14 12:47:57 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:42:15 -0500 |
commit | bab5662021721794c4ac9abe3373d50a2b96b1d5 (patch) | |
tree | 86795830ab360ee78e394eb3c71311cbef867999 /source4/nbt_server/wins/winsserver.c | |
parent | d49e67f06f55054f23dbef609b4debb11c157ffa (diff) | |
download | samba-bab5662021721794c4ac9abe3373d50a2b96b1d5.tar.gz samba-bab5662021721794c4ac9abe3373d50a2b96b1d5.tar.bz2 samba-bab5662021721794c4ac9abe3373d50a2b96b1d5.zip |
r11022: r10309@SERNOX: metze | 2005-09-19 11:08:37 +0200
- add winsdb_connect() function, so that the winsdb can be opened by the wrepl_server/ code
- remove maintaining of a min_version field, as it was implemented incorrect, and is maybe not needed at all
- fix handling of max_version, (we started with 0, on each server start)
metze
(This used to be commit e6106e21a0b097ec45948a08f499e44d32db8d2a)
Diffstat (limited to 'source4/nbt_server/wins/winsserver.c')
-rw-r--r-- | source4/nbt_server/wins/winsserver.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/source4/nbt_server/wins/winsserver.c b/source4/nbt_server/wins/winsserver.c index c9758b3162..a2f7fccad5 100644 --- a/source4/nbt_server/wins/winsserver.c +++ b/source4/nbt_server/wins/winsserver.c @@ -274,15 +274,18 @@ NTSTATUS nbtd_winsserver_init(struct nbtd_server *nbtsrv) return NT_STATUS_OK; } - nbtsrv->winssrv = talloc(nbtsrv, struct wins_server); + nbtsrv->winssrv = talloc_zero(nbtsrv, struct wins_server); NT_STATUS_HAVE_NO_MEMORY(nbtsrv->winssrv); nbtsrv->winssrv->max_ttl = lp_max_wins_ttl(); nbtsrv->winssrv->min_ttl = lp_min_wins_ttl(); - nbtsrv->winssrv->min_version = 0; - nbtsrv->winssrv->max_version = 0; + + nbtsrv->winssrv->wins_db = winsdb_connect(nbtsrv->winssrv); + if (!nbtsrv->winssrv->wins_db) { + return NT_STATUS_INTERNAL_DB_ERROR; + } irpc_add_name(nbtsrv->task->msg_ctx, "wins_server"); - return winsdb_init(nbtsrv->winssrv); + return NT_STATUS_OK; } |