diff options
author | Stefan Metzmacher <metze@samba.org> | 2005-09-26 11:47:55 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:38:57 -0500 |
commit | ab4d635b92b116b02b88843b4ec4f5b7517bab1a (patch) | |
tree | 63c3ee12153b629071d2ba0209a0a31b134c449e /source4/nbt_server/wins | |
parent | 0d46be147a1e755bdd6f21a5ddc83b5c39585529 (diff) | |
download | samba-ab4d635b92b116b02b88843b4ec4f5b7517bab1a.tar.gz samba-ab4d635b92b116b02b88843b4ec4f5b7517bab1a.tar.bz2 samba-ab4d635b92b116b02b88843b4ec4f5b7517bab1a.zip |
r10504: - seperate implementation specific stuff, from the generic composite
stuff.
- don't use SMBCLI_REQUEST_* state's in the genreic composite stuff
- move monitor_fn to libnet.
NOTE: I have maybe found some bugs, in code that is dirrectly in DONE or ERROR
state in the _send() function. I haven't fixed this bugs in this
commit! We may need some composite_trigger_*() functions or so.
And maybe some other generic helper functions...
metze
(This used to be commit 4527815a0a9b96e460f301cb1f0c0b3964c166fc)
Diffstat (limited to 'source4/nbt_server/wins')
-rw-r--r-- | source4/nbt_server/wins/winsclient.c | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/source4/nbt_server/wins/winsclient.c b/source4/nbt_server/wins/winsclient.c index cfb68a3aaf..fdfdc8f0ed 100644 --- a/source4/nbt_server/wins/winsclient.c +++ b/source4/nbt_server/wins/winsclient.c @@ -22,7 +22,6 @@ #include "includes.h" #include "nbt_server/nbt_server.h" -#include "libcli/raw/libcliraw.h" #include "libcli/composite/composite.h" #include "lib/events/events.h" #include "smbd/service_task.h" @@ -38,15 +37,15 @@ static struct nbt_name_socket *wins_socket(struct nbtd_interface *iface) static void nbtd_wins_refresh(struct event_context *ev, struct timed_event *te, - struct timeval t, void *private); + struct timeval t, void *private_data); /* retry a WINS name registration */ static void nbtd_wins_register_retry(struct event_context *ev, struct timed_event *te, - struct timeval t, void *private) + struct timeval t, void *private_data) { - struct nbtd_iface_name *iname = talloc_get_type(private, struct nbtd_iface_name); + struct nbtd_iface_name *iname = talloc_get_type(private_data, struct nbtd_iface_name); nbtd_winsclient_register(iname); } @@ -58,7 +57,7 @@ static void nbtd_wins_refresh_handler(struct composite_context *c) { NTSTATUS status; struct nbt_name_refresh_wins io; - struct nbtd_iface_name *iname = talloc_get_type(c->async.private, + struct nbtd_iface_name *iname = talloc_get_type(c->async.private_data, struct nbtd_iface_name); TALLOC_CTX *tmp_ctx = talloc_new(iname); @@ -78,7 +77,7 @@ static void nbtd_wins_refresh_handler(struct composite_context *c) nbt_name_string(tmp_ctx, &iname->name), nt_errstr(status))); talloc_free(tmp_ctx); return; - } + } if (io.out.rcode != 0) { DEBUG(1,("WINS server %s rejected name refresh of %s - %s\n", @@ -113,9 +112,9 @@ static void nbtd_wins_refresh_handler(struct composite_context *c) refresh a WINS name registration */ static void nbtd_wins_refresh(struct event_context *ev, struct timed_event *te, - struct timeval t, void *private) + struct timeval t, void *private_data) { - struct nbtd_iface_name *iname = talloc_get_type(private, struct nbtd_iface_name); + struct nbtd_iface_name *iname = talloc_get_type(private_data, struct nbtd_iface_name); struct nbtd_interface *iface = iname->iface; struct nbt_name_refresh_wins io; struct composite_context *c; @@ -136,7 +135,7 @@ static void nbtd_wins_refresh(struct event_context *ev, struct timed_event *te, talloc_steal(c, io.in.addresses); c->async.fn = nbtd_wins_refresh_handler; - c->async.private = iname; + c->async.private_data = iname; talloc_free(tmp_ctx); } @@ -149,7 +148,7 @@ static void nbtd_wins_register_handler(struct composite_context *c) { NTSTATUS status; struct nbt_name_register_wins io; - struct nbtd_iface_name *iname = talloc_get_type(c->async.private, + struct nbtd_iface_name *iname = talloc_get_type(c->async.private_data, struct nbtd_iface_name); TALLOC_CTX *tmp_ctx = talloc_new(iname); @@ -227,5 +226,5 @@ void nbtd_winsclient_register(struct nbtd_iface_name *iname) talloc_steal(c, io.in.addresses); c->async.fn = nbtd_wins_register_handler; - c->async.private = iname; + c->async.private_data = iname; } |