s4-smbtorture: pick correct last packet while checking backchannel replies in RPC...
[ira/wip.git] / source4 / torture / nbt / winsbench.c
index ea4abaf21b5a11c773d422825c3f6e14ca0e067e..bea3d4f9cff8d604ddb0e67a436dcd0815cb6576 100644 (file)
@@ -56,7 +56,7 @@ static struct nbt_name generate_name(TALLOC_CTX *tctx, int idx)
 
 static void register_handler(struct nbt_name_request *req)
 {
-       struct idx_state *istate = talloc_get_type(req->async.private, struct idx_state);
+       struct idx_state *istate = talloc_get_type(req->async.private_data, struct idx_state);
        struct wins_state *state = istate->state;
        struct nbt_name_register io;
        NTSTATUS status;
@@ -100,7 +100,7 @@ static void generate_register(struct nbt_name_socket *nbtsock, struct wins_state
        req = nbt_name_register_send(nbtsock, &io);
 
        req->async.fn = register_handler;
-       req->async.private = istate;
+       req->async.private_data = istate;
 
        talloc_free(tmp_ctx);
 }
@@ -108,7 +108,7 @@ static void generate_register(struct nbt_name_socket *nbtsock, struct wins_state
 
 static void release_handler(struct nbt_name_request *req)
 {
-       struct idx_state *istate = talloc_get_type(req->async.private, struct idx_state);
+       struct idx_state *istate = talloc_get_type(req->async.private_data, struct idx_state);
        struct wins_state *state = istate->state;
        struct nbt_name_release io;
        NTSTATUS status;
@@ -150,7 +150,7 @@ static void generate_release(struct nbt_name_socket *nbtsock, struct wins_state
        req = nbt_name_release_send(nbtsock, &io);
 
        req->async.fn = release_handler;
-       req->async.private = istate;
+       req->async.private_data = istate;
 
        talloc_free(tmp_ctx);
 }
@@ -158,7 +158,7 @@ static void generate_release(struct nbt_name_socket *nbtsock, struct wins_state
 
 static void query_handler(struct nbt_name_request *req)
 {
-       struct idx_state *istate = talloc_get_type(req->async.private, struct idx_state);
+       struct idx_state *istate = talloc_get_type(req->async.private_data, struct idx_state);
        struct wins_state *state = istate->state;
        struct nbt_name_query io;
        NTSTATUS status;
@@ -197,7 +197,7 @@ static void generate_query(struct nbt_name_socket *nbtsock, struct wins_state *s
        req = nbt_name_query_send(nbtsock, &io);
 
        req->async.fn = query_handler;
-       req->async.private = istate;
+       req->async.private_data = istate;
 
        talloc_free(tmp_ctx);
 }
@@ -225,7 +225,7 @@ static void generate_request(struct nbt_name_socket *nbtsock, struct wins_state
 */
 static bool bench_wins(struct torture_context *tctx)
 {
-       struct nbt_name_socket *nbtsock = nbt_name_socket_init(tctx, NULL, lp_iconv_convenience(tctx->lp_ctx));
+       struct nbt_name_socket *nbtsock = nbt_name_socket_init(tctx, tctx->ev, lp_iconv_convenience(tctx->lp_ctx));
        int num_sent=0;
        struct timeval tv = timeval_current();
        bool ret = true;