summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2010-10-11 08:54:27 +0200
committerStefan Metzmacher <metze@samba.org>2010-10-18 15:36:15 +0000
commit43fb7f1698c0c8aaa7f1e5d6a0f924396a9a12fe (patch)
tree98ccb1c081b1d6c86ef032494d964451fd546a80 /source4
parent332f261bbf5a3179cbab6cb7aa8b490d0072b7af (diff)
downloadsamba-43fb7f1698c0c8aaa7f1e5d6a0f924396a9a12fe.tar.gz
samba-43fb7f1698c0c8aaa7f1e5d6a0f924396a9a12fe.tar.bz2
samba-43fb7f1698c0c8aaa7f1e5d6a0f924396a9a12fe.zip
libcli/nbt: convert nbt_name_refresh_wins_send/recv to tevent_req
metze
Diffstat (limited to 'source4')
-rw-r--r--source4/nbt_server/wins/winsclient.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/source4/nbt_server/wins/winsclient.c b/source4/nbt_server/wins/winsclient.c
index f6f6ff48ec..0c513d1ae0 100644
--- a/source4/nbt_server/wins/winsclient.c
+++ b/source4/nbt_server/wins/winsclient.c
@@ -74,15 +74,16 @@ struct nbtd_wins_refresh_state {
/*
called when a wins name refresh has completed
*/
-static void nbtd_wins_refresh_handler(struct composite_context *subreq)
+static void nbtd_wins_refresh_handler(struct tevent_req *subreq)
{
NTSTATUS status;
struct nbtd_wins_refresh_state *state =
- talloc_get_type_abort(subreq->async.private_data,
+ tevent_req_callback_data(subreq,
struct nbtd_wins_refresh_state);
struct nbtd_iface_name *iname = state->iname;
status = nbt_name_refresh_wins_recv(subreq, state, &state->io);
+ TALLOC_FREE(subreq);
if (NT_STATUS_EQUAL(status, NT_STATUS_IO_TIMEOUT)) {
/* our WINS server is dead - start registration over
from scratch */
@@ -139,7 +140,7 @@ static void nbtd_wins_refresh(struct tevent_context *ev, struct tevent_timer *te
struct nbtd_iface_name *iname = talloc_get_type(private_data, struct nbtd_iface_name);
struct nbtd_interface *iface = iname->iface;
struct nbt_name_socket *nbtsock = wins_socket(iface);
- struct composite_context *subreq;
+ struct tevent_req *subreq;
struct nbtd_wins_refresh_state *state;
state = talloc_zero(iname, struct nbtd_wins_refresh_state);
@@ -162,14 +163,13 @@ static void nbtd_wins_refresh(struct tevent_context *ev, struct tevent_timer *te
return;
}
- subreq = nbt_name_refresh_wins_send(nbtsock, &state->io);
+ subreq = nbt_name_refresh_wins_send(state, ev, nbtsock, &state->io);
if (subreq == NULL) {
talloc_free(state);
return;
}
- subreq->async.fn = nbtd_wins_refresh_handler;
- subreq->async.private_data = state;
+ tevent_req_set_callback(subreq, nbtd_wins_refresh_handler, state);
}