/*
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 */
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);
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);
}