torture: use tevent_ functions names instead of the legacy event_ ones
authorSimo Sorce <ssorce@redhat.com>
Tue, 25 May 2010 19:23:55 +0000 (15:23 -0400)
committerSimo Sorce <idra@samba.org>
Sat, 13 Aug 2011 13:54:15 +0000 (09:54 -0400)
22 files changed:
source3/torture/torture.c
source4/torture/basic/base.c
source4/torture/basic/misc.c
source4/torture/nbt/dgram.c
source4/torture/nbt/query.c
source4/torture/nbt/wins.c
source4/torture/nbt/winsbench.c
source4/torture/nbt/winsreplication.c
source4/torture/raw/composite.c
source4/torture/raw/lockbench.c
source4/torture/raw/offline.c
source4/torture/raw/open.c
source4/torture/raw/openbench.c
source4/torture/raw/oplock.c
source4/torture/rpc/echo.c
source4/torture/rpc/lsa.c
source4/torture/rpc/netlogon.c
source4/torture/rpc/schannel.c
source4/torture/smb2/create.c
source4/torture/smb2/lock.c
source4/torture/smb2/notify.c
source4/torture/smb2/oplock.c

index d5c2a567aa0ff0f945c5cd7267bfdecf628d109e..888bcb1c863cec5f9044b9f87927c927f359dc70 100644 (file)
@@ -6517,7 +6517,7 @@ static bool run_chain1(int dummy)
        }
 
        while (!done) {
-               event_loop_once(evt);
+               tevent_loop_once(evt);
        }
 
        torture_close_connection(cli1);
@@ -6573,7 +6573,7 @@ static bool run_chain2(int dummy)
        }
 
        while (!done) {
-               event_loop_once(evt);
+               tevent_loop_once(evt);
        }
 
        torture_close_connection(cli1);
@@ -8424,7 +8424,7 @@ static bool run_local_wbclient(int dummy)
        i = 0;
 
        while (i < nprocs * torture_numops) {
-               event_loop_once(ev);
+               tevent_loop_once(ev);
        }
 
        result = true;
index d7bac459c3799bd82ff34d8e2b3be29703e5b6cf..3e405f7d09189257496e7a7052068f95a7d0db16 100644 (file)
@@ -360,7 +360,7 @@ static bool run_negprot_nowait(struct torture_context *tctx)
        for (i=0;i<100;i++) {
                struct smbcli_request *req;
                req = smb_raw_negotiate_send(cli->transport, lpcfg_unicode(tctx->lp_ctx), PROTOCOL_NT1);
-               event_loop_once(cli->transport->socket->event.ctx);
+               tevent_loop_once(cli->transport->socket->event.ctx);
                if (req->state == SMBCLI_REQUEST_ERROR) {
                        if (i > 0) {
                                torture_comment(tctx, "Failed to fill pipe packet[%d] - %s (ignored)\n", i+1, nt_errstr(req->status));
index 5fbbc61e0fb8251604d4b89564e12290cf1b356c..0fa9a9e98f21cddb199b0f142dbd66f41f03f378 100644 (file)
@@ -997,7 +997,7 @@ bool run_benchrw(struct torture_context *tctx)
                                finished++;
                                break;
                        default:
-                               event_loop_once(ev);
+                               tevent_loop_once(ev);
                        }
                }
        }
index aa4759edaf98f9185815413fb5f831dba6a6ecca..68d44ff774e6f3a31d0217b8abfeb1a09814e375 100644 (file)
@@ -139,7 +139,7 @@ static bool nbt_test_netlogon(struct torture_context *tctx)
        torture_assert_ntstatus_ok(tctx, status, "Failed to send netlogon request");
 
        while (timeval_elapsed(&tv) < 5 && !dgmslot->private_data) {
-               event_loop_once(dgmsock->event_ctx);
+               tevent_loop_once(dgmsock->event_ctx);
        }
 
        response = talloc_get_type(dgmslot->private_data, struct nbt_netlogon_response);
@@ -235,7 +235,7 @@ static bool nbt_test_netlogon2(struct torture_context *tctx)
        torture_assert_ntstatus_ok(tctx, status, "Failed to send netlogon request");
 
        while (timeval_elapsed(&tv) < 5 && dgmslot->private_data == NULL) {
-               event_loop_once(dgmsock->event_ctx);
+               tevent_loop_once(dgmsock->event_ctx);
        }
 
        response = talloc_get_type(dgmslot->private_data, struct nbt_netlogon_response);
@@ -275,7 +275,7 @@ static bool nbt_test_netlogon2(struct torture_context *tctx)
        torture_assert_ntstatus_ok(tctx, status, "Failed to send netlogon request");
 
        while (timeval_elapsed(&tv) < 5 && dgmslot->private_data == NULL) {
-               event_loop_once(dgmsock->event_ctx);
+               tevent_loop_once(dgmsock->event_ctx);
        }
 
        response = talloc_get_type(dgmslot->private_data, struct nbt_netlogon_response);
@@ -327,7 +327,7 @@ static bool nbt_test_netlogon2(struct torture_context *tctx)
 
 
        while (timeval_elapsed(&tv) < 5 && dgmslot->private_data == NULL) {
-               event_loop_once(dgmsock->event_ctx);
+               tevent_loop_once(dgmsock->event_ctx);
        }
 
        response = talloc_get_type(dgmslot->private_data, struct nbt_netlogon_response);
@@ -369,7 +369,7 @@ static bool nbt_test_netlogon2(struct torture_context *tctx)
 
 
        while (timeval_elapsed(&tv) < 5 && dgmslot->private_data == NULL) {
-               event_loop_once(dgmsock->event_ctx);
+               tevent_loop_once(dgmsock->event_ctx);
        }
 
        response = talloc_get_type(dgmslot->private_data, struct nbt_netlogon_response);
@@ -408,7 +408,7 @@ static bool nbt_test_netlogon2(struct torture_context *tctx)
 
 
        while (timeval_elapsed(&tv) < 5 && dgmslot->private_data == NULL) {
-               event_loop_once(dgmsock->event_ctx);
+               tevent_loop_once(dgmsock->event_ctx);
        }
 
        response = talloc_get_type(dgmslot->private_data, struct nbt_netlogon_response);
@@ -517,7 +517,7 @@ static bool nbt_test_ntlogon(struct torture_context *tctx)
        torture_assert_ntstatus_ok(tctx, status, "Failed to send ntlogon request");
 
        while (timeval_elapsed(&tv) < 5 && dgmslot->private_data == NULL) {
-               event_loop_once(dgmsock->event_ctx);
+               tevent_loop_once(dgmsock->event_ctx);
        }
 
        response = talloc_get_type(dgmslot->private_data, struct nbt_netlogon_response);
@@ -561,7 +561,7 @@ static bool nbt_test_ntlogon(struct torture_context *tctx)
        torture_assert_ntstatus_ok(tctx, status, "Failed to send ntlogon request");
 
        while (timeval_elapsed(&tv) < 5 && dgmslot->private_data == NULL) {
-               event_loop_once(dgmsock->event_ctx);
+               tevent_loop_once(dgmsock->event_ctx);
        }
 
        response = talloc_get_type(dgmslot->private_data, struct nbt_netlogon_response);
@@ -602,7 +602,7 @@ static bool nbt_test_ntlogon(struct torture_context *tctx)
        torture_assert_ntstatus_ok(tctx, status, "Failed to send ntlogon request");
 
        while (timeval_elapsed(&tv) < 5 && !dgmslot->private_data) {
-               event_loop_once(dgmsock->event_ctx);
+               tevent_loop_once(dgmsock->event_ctx);
        }
 
        response = talloc_get_type(dgmslot->private_data, struct nbt_netlogon_response);
@@ -640,7 +640,7 @@ static bool nbt_test_ntlogon(struct torture_context *tctx)
        torture_assert_ntstatus_ok(tctx, status, "Failed to send ntlogon request");
 
        while (timeval_elapsed(&tv) < 5 && !dgmslot->private_data) {
-               event_loop_once(dgmsock->event_ctx);
+               tevent_loop_once(dgmsock->event_ctx);
        }
 
        response = talloc_get_type(dgmslot->private_data, struct nbt_netlogon_response);
index d64683aa577b92197140d328b08b0273ed7085e3..001ff19413b8d8ae8476b72750072a2831a1c11a 100644 (file)
@@ -88,11 +88,11 @@ static bool bench_namequery(struct torture_context *tctx)
                        }
                }
 
-               event_loop_once(nbtsock->event_ctx);
+               tevent_loop_once(nbtsock->event_ctx);
        }
 
        while (num_sent != (result->num_pass + result->num_fail)) {
-               event_loop_once(nbtsock->event_ctx);
+               tevent_loop_once(nbtsock->event_ctx);
        }
 
        torture_comment(tctx, "%.1f queries per second (%d failures)  \n", 
index 571249f562dfd2fdce418e389358838c3359694d..bd023294cbf17023031364a5714e67c56c80192e 100644 (file)
@@ -156,7 +156,7 @@ static bool nbt_test_wins_name(struct torture_context *tctx, const char *address
                 */
                req = nbt_name_register_send(nbtsock, &name_register);
                while (true) {
-                       event_loop_once(nbtsock->event_ctx);
+                       tevent_loop_once(nbtsock->event_ctx);
                        if (req->state != NBT_REQUEST_WAIT) {
                                break;
                        }
@@ -170,7 +170,7 @@ static bool nbt_test_wins_name(struct torture_context *tctx, const char *address
                                req->state = NBT_REQUEST_SEND;
                                DLIST_ADD_END(nbtsock->send_queue, req,
                                              struct nbt_name_request *);
-                               EVENT_FD_WRITEABLE(nbtsock->fde);
+                               TEVENT_FD_WRITEABLE(nbtsock->fde);
                                break;
                        }
                }
index cb71d8755dd710d8036a35316c801efa21877e29..3722202c6f4e41a996236bfbc319ac0760144766 100644 (file)
@@ -270,11 +270,11 @@ static bool bench_wins(struct torture_context *tctx)
                        }
                }
 
-               event_loop_once(nbtsock->event_ctx);
+               tevent_loop_once(nbtsock->event_ctx);
        }
 
        while (num_sent != (state->pass_count + state->fail_count)) {
-               event_loop_once(nbtsock->event_ctx);
+               tevent_loop_once(nbtsock->event_ctx);
        }
 
        torture_comment(tctx, "%.1f queries per second (%d failures)  \n", 
index 7165f10dbbbbcc5e86e9fb3d3eb86bf0462b1478..56a1c09301c545d754b790e72a861016c7f8133b 100644 (file)
@@ -9378,7 +9378,7 @@ static bool test_conflict_owned_active_vs_replica(struct torture_context *tctx,
                        req = nbt_name_register_send(ctx->nbtsock, name_register);
 
                        /* push the request on the wire */
-                       event_loop_once(ctx->nbtsock->event_ctx);
+                       tevent_loop_once(ctx->nbtsock->event_ctx);
 
                        /*
                         * if we register multiple addresses,
@@ -9389,7 +9389,7 @@ static bool test_conflict_owned_active_vs_replica(struct torture_context *tctx,
                                end = timeval_current_ofs(records[i].defend.timeout,0);
                                records[i].defend.ret = true;
                                while (records[i].defend.timeout > 0) {
-                                       event_loop_once(ctx->nbtsock_srv->event_ctx);
+                                       tevent_loop_once(ctx->nbtsock_srv->event_ctx);
                                        if (timeval_expired(&end)) break;
                                }
                                ret &= records[i].defend.ret;
@@ -9451,7 +9451,7 @@ static bool test_conflict_owned_active_vs_replica(struct torture_context *tctx,
                end = timeval_current_ofs(records[i].defend.timeout,0);
                records[i].defend.ret = true;
                while (records[i].defend.timeout > 0) {
-                       event_loop_once(ctx->nbtsock_srv->event_ctx);
+                       tevent_loop_once(ctx->nbtsock_srv->event_ctx);
                        if (timeval_expired(&end)) break;
                }
                ret &= records[i].defend.ret;
@@ -9466,7 +9466,7 @@ static bool test_conflict_owned_active_vs_replica(struct torture_context *tctx,
                        end = timeval_current_ofs(records[i].defend.timeout,0);
                        records[i].defend.ret = true;
                        while (records[i].defend.timeout > 0) {
-                               event_loop_once(ctx->nbtsock_srv->event_ctx);
+                               tevent_loop_once(ctx->nbtsock_srv->event_ctx);
                                if (timeval_expired(&end)) break;
                        }
                        ret &= records[i].defend.ret;
@@ -9693,7 +9693,7 @@ static void test_conflict_owned_active_vs_replica_handler_query(struct nbt_name_
 
        /* make sure we push the reply to the wire */
        while (nbtsock->send_queue) {
-               event_loop_once(nbtsock->event_ctx);
+               tevent_loop_once(nbtsock->event_ctx);
        }
        smb_msleep(1000);
 
@@ -9750,7 +9750,7 @@ static void test_conflict_owned_active_vs_replica_handler_release(
 
        /* make sure we push the reply to the wire */
        while (nbtsock->send_queue) {
-               event_loop_once(nbtsock->event_ctx);
+               tevent_loop_once(nbtsock->event_ctx);
        }
        smb_msleep(1000);
 
index fd1f6aaf979158f33f62906c980fbe0007d95874..ee3bf7260daf3caa8ae7cc89157a91e93d3c19c6 100644 (file)
@@ -88,7 +88,7 @@ static bool test_loadfile(struct smbcli_state *cli, struct torture_context *tctx
 
        printf("waiting for completion\n");
        while (*count != num_ops) {
-               event_loop_once(cli->transport->socket->event.ctx);
+               tevent_loop_once(cli->transport->socket->event.ctx);
                if (torture_setting_bool(tctx, "progress", true)) {
                        printf("(%s) count=%d\r", __location__, *count);
                        fflush(stdout);
@@ -182,7 +182,7 @@ static bool test_fetchfile(struct smbcli_state *cli, struct torture_context *tct
        printf("waiting for completion\n");
 
        while (*count != torture_numops) {
-               event_loop_once(event_ctx);
+               tevent_loop_once(event_ctx);
                if (torture_setting_bool(tctx, "progress", true)) {
                        printf("(%s) count=%d\r", __location__, *count);
                        fflush(stdout);
@@ -302,7 +302,7 @@ static bool test_appendacl(struct smbcli_state *cli, struct torture_context *tct
        event_ctx = tctx->ev;
        printf("waiting for completion\n");
        while (*count != num_ops) {
-               event_loop_once(event_ctx);
+               tevent_loop_once(event_ctx);
                if (torture_setting_bool(tctx, "progress", true)) {
                        printf("(%s) count=%d\r", __location__, *count);
                        fflush(stdout);
@@ -372,7 +372,7 @@ static bool test_fsinfo(struct smbcli_state *cli, struct torture_context *tctx)
        printf("waiting for completion\n");
 
        while (*count < torture_numops) {
-               event_loop_once(event_ctx);
+               tevent_loop_once(event_ctx);
                if (torture_setting_bool(tctx, "progress", true)) {
                        printf("(%s) count=%d\r", __location__, *count);
                        fflush(stdout);
index 58e709dd2b8d2076f14a6ff538c1d84503b79169..0a4faface875ff9d5b51aa13c41c481dcf459df5 100644 (file)
@@ -153,7 +153,7 @@ static void reopen_connection_complete(struct composite_context *ctx)
        status = smb_composite_connect_recv(ctx, state->mem_ctx);
        if (!NT_STATUS_IS_OK(status)) {
                talloc_free(state->te);
-               state->te = event_add_timed(state->ev, state->mem_ctx, 
+               state->te = tevent_add_timer(state->ev, state->mem_ctx,
                                            timeval_current_ofs(1,0), 
                                            reopen_connection, state);
                return;
@@ -163,7 +163,7 @@ static void reopen_connection_complete(struct composite_context *ctx)
        state->tree = io->out.tree;
 
        /* do the reopen as a separate event */
-       event_add_timed(state->ev, state->mem_ctx, timeval_zero(), reopen_file, state);
+       tevent_add_timer(state->ev, state->mem_ctx, timeval_zero(), reopen_file, state);
 }
 
        
@@ -233,7 +233,7 @@ static void lock_completion(struct smbcli_request *req)
                        num_connected--;        
                        DEBUG(0,("reopening connection to %s\n", state->dest_host));
                        talloc_free(state->te);
-                       state->te = event_add_timed(state->ev, state->mem_ctx, 
+                       state->te = tevent_add_timer(state->ev, state->mem_ctx,
                                                    timeval_current_ofs(1,0), 
                                                    reopen_connection, state);
                } else {
@@ -272,7 +272,7 @@ static void echo_completion(struct smbcli_request *req)
                num_connected--;        
                DEBUG(0,("reopening connection to %s\n", state->dest_host));
                talloc_free(state->te);
-               state->te = event_add_timed(state->ev, state->mem_ctx, 
+               state->te = tevent_add_timer(state->ev, state->mem_ctx,
                                            timeval_current_ofs(1,0), 
                                            reopen_connection, state);
        }
@@ -290,7 +290,7 @@ static void report_rate(struct tevent_context *ev, struct tevent_timer *te,
        }
        printf("\r");
        fflush(stdout);
-       event_add_timed(ev, state, timeval_current_ofs(1, 0), report_rate, state);
+       tevent_add_timer(ev, state, timeval_current_ofs(1, 0), report_rate, state);
 
        /* send an echo on each interface to ensure it stays alive - this helps
           with IP takeover */
@@ -396,12 +396,12 @@ bool torture_bench_lock(struct torture_context *torture)
        tv = timeval_current(); 
 
        if (progress) {
-               event_add_timed(torture->ev, state, timeval_current_ofs(1, 0), report_rate, state);
+               tevent_add_timer(torture->ev, state, timeval_current_ofs(1, 0), report_rate, state);
        }
 
        printf("Running for %d seconds\n", timelimit);
        while (timeval_elapsed(&tv) < timelimit) {
-               event_loop_once(torture->ev);
+               tevent_loop_once(torture->ev);
 
                if (lock_failed) {
                        DEBUG(0,("locking failed\n"));
index a8259e2d42189a8cb26d6e2790c6145fa8fb0ad1..85b1235ff6daf609bb06bfbbc27839d08462511e 100644 (file)
@@ -355,7 +355,7 @@ static void report_rate(struct tevent_context *ev, struct tevent_timer *te,
               latencies[OP_LOADFILE],
               worst_latencies[OP_LOADFILE]);
        fflush(stdout);
-       event_add_timed(ev, state, timeval_current_ofs(1, 0), report_rate, state);
+       tevent_add_timer(ev, state, timeval_current_ofs(1, 0), report_rate, state);
 
        for (i=0;i<OP_ENDOFLIST;i++) {
                if (latencies[i] > worst_latencies[i]) {
@@ -471,12 +471,12 @@ bool torture_test_offline(struct torture_context *torture)
        tv = timeval_current(); 
 
        if (progress) {
-               event_add_timed(torture->ev, state, timeval_current_ofs(1, 0), report_rate, state);
+               tevent_add_timer(torture->ev, state, timeval_current_ofs(1, 0), report_rate, state);
        }
 
        printf("Running for %d seconds\n", timelimit);
        while (timeval_elapsed(&tv) < timelimit) {
-               event_loop_once(torture->ev);
+               tevent_loop_once(torture->ev);
 
                if (test_failed) {
                        DEBUG(0,("test failed\n"));
@@ -490,7 +490,7 @@ bool torture_test_offline(struct torture_context *torture)
                while (state[i].loadfile || 
                       state[i].savefile ||
                       state[i].req) {
-                       event_loop_once(torture->ev);
+                       tevent_loop_once(torture->ev);
                }
        }       
 
index 8a66a12cd577197c6775597e8f155ff311ad1734..3460a172b626ebd5de7915a33ffa949013648336 100644 (file)
@@ -1633,9 +1633,9 @@ static bool test_raw_open_multi(struct torture_context *tctx, struct smbcli_stat
                        break;
                }
 
-               if (event_loop_once(tctx->ev) != 0) {
+               if (tevent_loop_once(tctx->ev) != 0) {
                        torture_result(tctx, TORTURE_FAIL,
-                               "(%s): event_loop_once failed\n", __location__);
+                               "(%s): tevent_loop_once failed\n", __location__);
                        return false;
                }
        }
index d0c785d4607c5e699cc2951e87cbb88fecb500b7..9543eea1b10813c70078c2e115e4d97ca7737f16 100644 (file)
@@ -91,7 +91,7 @@ static void reopen_connection_complete(struct composite_context *ctx)
        status = smb_composite_connect_recv(ctx, state->mem_ctx);
        if (!NT_STATUS_IS_OK(status)) {
                talloc_free(state->te);
-               state->te = event_add_timed(state->ev, state->mem_ctx, 
+               state->te = tevent_add_timer(state->ev, state->mem_ctx,
                                            timeval_current_ofs(1,0), 
                                            reopen_connection, state);
                return;
@@ -233,7 +233,7 @@ static void open_completed(struct smbcli_request *req)
                DEBUG(0,("[%u] reopening connection to %s\n",
                         state->client_num, state->dest_host));
                talloc_free(state->te);
-               state->te = event_add_timed(state->ev, state->mem_ctx, 
+               state->te = tevent_add_timer(state->ev, state->mem_ctx,
                                            timeval_current_ofs(1,0), 
                                            reopen_connection, state);
                return;
@@ -293,7 +293,7 @@ static void close_completed(struct smbcli_request *req)
                DEBUG(0,("[%u] reopening connection to %s\n",
                         state->client_num, state->dest_host));
                talloc_free(state->te);
-               state->te = event_add_timed(state->ev, state->mem_ctx, 
+               state->te = tevent_add_timer(state->ev, state->mem_ctx,
                                            timeval_current_ofs(1,0), 
                                            reopen_connection, state);
                return;
@@ -326,7 +326,7 @@ static void echo_completion(struct smbcli_request *req)
                DEBUG(0,("[%u] reopening connection to %s\n",
                         state->client_num, state->dest_host));
                talloc_free(state->te);
-               state->te = event_add_timed(state->ev, state->mem_ctx, 
+               state->te = tevent_add_timer(state->ev, state->mem_ctx,
                                            timeval_current_ofs(1,0), 
                                            reopen_connection, state);
        }
@@ -344,7 +344,7 @@ static void report_rate(struct tevent_context *ev, struct tevent_timer *te,
        }
        printf("\r");
        fflush(stdout);
-       report_te = event_add_timed(ev, state, timeval_current_ofs(1, 0), 
+       report_te = tevent_add_timer(ev, state, timeval_current_ofs(1, 0),
                                    report_rate, state);
 
        /* send an echo on each interface to ensure it stays alive - this helps
@@ -434,13 +434,13 @@ bool torture_bench_open(struct torture_context *torture)
        tv = timeval_current(); 
 
        if (progress) {
-               report_te = event_add_timed(torture->ev, state, timeval_current_ofs(1, 0), 
+               report_te = tevent_add_timer(torture->ev, state, timeval_current_ofs(1, 0),
                                            report_rate, state);
        }
 
        printf("Running for %d seconds\n", timelimit);
        while (timeval_elapsed(&tv) < timelimit) {
-               event_loop_once(torture->ev);
+               tevent_loop_once(torture->ev);
 
                if (open_failed) {
                        DEBUG(0,("open failed\n"));
index 01b1dd2b93d20cbb312d0b4c6c9c1bea8488341f..46f2ed32301248b519b17f83d42b00e8c1f093d2 100644 (file)
@@ -226,7 +226,7 @@ static void torture_wait_for_oplock_break(struct torture_context *tctx)
        /* Wait .1 seconds for an oplock break */
        ne = tevent_timeval_current_ofs(0, 100000);
 
-       if ((te = event_add_timed(tctx->ev, tmp_ctx, ne, timeout_cb, &timesup))
+       if ((te = tevent_add_timer(tctx->ev, tmp_ctx, ne, timeout_cb, &timesup))
            == NULL)
        {
                torture_comment(tctx, "Failed to wait for an oplock break. "
@@ -235,7 +235,7 @@ static void torture_wait_for_oplock_break(struct torture_context *tctx)
        }
 
        while (!timesup && break_info.count < old_count + 1) {
-               if (event_loop_once(tctx->ev) != 0) {
+               if (tevent_loop_once(tctx->ev) != 0) {
                        torture_comment(tctx, "Failed to wait for an oplock "
                                              "break. test results may not be "
                                              "accurate.");
@@ -4196,7 +4196,7 @@ bool torture_hold_oplock(struct torture_context *torture,
        }
 
        printf("Waiting for oplock events\n");
-       event_loop_wait(ev);
+       tevent_loop_wait(ev);
 
        return true;
 }
index 643b21fa7f3ab9fc6af7dde0c09824997d83e9cc..db6d2414a93c3c6669d2de3523b10aef4a05ecaa 100644 (file)
@@ -258,7 +258,7 @@ static bool test_sleep(struct torture_context *tctx,
 
        ctx = dcerpc_event_context(p);
        while (total_done < ASYNC_COUNT) {
-               torture_assert(tctx, event_loop_once(ctx) == 0, 
+               torture_assert(tctx, tevent_loop_once(ctx) == 0, 
                                           "Event context loop failed");
                for (i=0;i<ASYNC_COUNT;i++) {
                        if (done2[i] == false && done1[i] == true) {
index 4fbf36c8940e851ad8be1bbb65d05175eec32280..c09a2daad2f249beb0ac450fe84669bd3ea04c55 100644 (file)
@@ -866,7 +866,7 @@ static bool test_LookupSids_async(struct dcerpc_binding_handle *b,
        }
 
        while (replies >= 0 && replies < num_async_requests) {
-               event_loop_once(tctx->ev);
+               tevent_loop_once(tctx->ev);
        }
 
        talloc_free(req);
index 70e1fd9ebbfc9cc6a917deb0e7ec3ce636c36188..0fe594cf7eaf44357685bf52c2823ee3f5ada192 100644 (file)
@@ -3453,8 +3453,8 @@ static bool test_GetDomainInfo_async(struct torture_context *tctx,
 
                /* even with this flush per request a w2k3 server seems to 
                   clag with multiple outstanding requests. bleergh. */
-               torture_assert_int_equal(tctx, event_loop_once(dcerpc_event_context(p)), 0, 
-                                        "event_loop_once failed");
+               torture_assert_int_equal(tctx, tevent_loop_once(dcerpc_event_context(p)), 0, 
+                                        "tevent_loop_once failed");
        }
 
        for (i=0;i<ASYNC_COUNT;i++) {
index 245f33c991b21e7b193510f0a592766685be4fb1..3bfed696e89c8cedd3698257ed17029e29831452 100644 (file)
@@ -763,8 +763,8 @@ bool torture_rpc_schannel_bench1(struct torture_context *torture)
        }
 
        while (NT_STATUS_IS_OK(s->error) && s->nprocs != s->nconns) {
-               int ev_ret = event_loop_once(torture->ev);
-               torture_assert(torture, ev_ret == 0, "event_loop_once failed");
+               int ev_ret = tevent_loop_once(torture->ev);
+               torture_assert(torture, ev_ret == 0, "tevent_loop_once failed");
 #endif
        }
        torture_assert_ntstatus_ok(torture, s->error, "Failed establish a connect");
@@ -851,8 +851,8 @@ bool torture_rpc_schannel_bench1(struct torture_context *torture)
        end = timeval_add(&start, s->timelimit, 0);
 
        while (NT_STATUS_IS_OK(s->error) && !timeval_expired(&end)) {
-               int ev_ret = event_loop_once(torture->ev);
-               torture_assert(torture, ev_ret == 0, "event_loop_once failed");
+               int ev_ret = tevent_loop_once(torture->ev);
+               torture_assert(torture, ev_ret == 0, "tevent_loop_once failed");
        }
        torture_assert_ntstatus_ok(torture, s->error, "Failed some request");
        s->stopped = true;
index f11c8375b19769415226fdf9d9eeb3b6ba2e42a9..47d61158c8b11c799f680c4b67ffefe29905dc5d 100644 (file)
@@ -966,8 +966,8 @@ static bool test_smb2_open_multi(struct torture_context *tctx,
                        break;
                }
 
-               if (event_loop_once(tctx->ev) != 0) {
-                       torture_comment(tctx, "event_loop_once failed\n");
+               if (tevent_loop_once(tctx->ev) != 0) {
+                       torture_comment(tctx, "tevent_loop_once failed\n");
                        ret = false;
                        goto done;
                }
index 348312657b43ac58a6f2e767047a0aee95a4c820..5bccf04f43805b6d462834587824d918cbdba685 100644 (file)
@@ -62,7 +62,7 @@
 
 #define WAIT_FOR_ASYNC_RESPONSE(req) \
        while (!req->cancel.can_cancel && req->state <= SMB2_REQUEST_RECV) { \
-               if (event_loop_once(req->transport->socket->event.ctx) != 0) { \
+               if (tevent_loop_once(req->transport->socket->event.ctx) != 0) { \
                        break; \
                } \
        }
index 80c560be0073672ef6c21f188e0f73b578c2559d..0f0e866098a7ba94e2a339b7589ebd730f431315 100644 (file)
@@ -101,7 +101,7 @@ static bool test_valid_request(struct torture_context *torture,
        req = smb2_notify_send(tree, &n);
 
        while (!req->cancel.can_cancel && req->state <= SMB2_REQUEST_RECV) {
-               if (event_loop_once(req->transport->socket->event.ctx) != 0) {
+               if (tevent_loop_once(req->transport->socket->event.ctx) != 0) {
                        break;
                }
        }
@@ -123,7 +123,7 @@ static bool test_valid_request(struct torture_context *torture,
        req = smb2_notify_send(tree, &n);
 
        while (!req->cancel.can_cancel && req->state <= SMB2_REQUEST_RECV) {
-               if (event_loop_once(req->transport->socket->event.ctx) != 0) {
+               if (tevent_loop_once(req->transport->socket->event.ctx) != 0) {
                        break;
                }
        }
@@ -142,7 +142,7 @@ static bool test_valid_request(struct torture_context *torture,
        req = smb2_notify_send(tree, &n);
 
        while (!req->cancel.can_cancel && req->state <= SMB2_REQUEST_RECV) {
-               if (event_loop_once(req->transport->socket->event.ctx) != 0) {
+               if (tevent_loop_once(req->transport->socket->event.ctx) != 0) {
                        break;
                }
        }
@@ -174,7 +174,7 @@ static bool test_valid_request(struct torture_context *torture,
        req = smb2_notify_send(tree, &n);
 
        while (!req->cancel.can_cancel && req->state <= SMB2_REQUEST_RECV) {
-               if (event_loop_once(req->transport->socket->event.ctx) != 0) {
+               if (tevent_loop_once(req->transport->socket->event.ctx) != 0) {
                        break;
                }
        }
@@ -188,7 +188,7 @@ static bool test_valid_request(struct torture_context *torture,
        n.in.buffer_size        = max_buffer_size;
        req = smb2_notify_send(tree, &n);
        while (!req->cancel.can_cancel && req->state <= SMB2_REQUEST_RECV) {
-               if (event_loop_once(req->transport->socket->event.ctx) != 0) {
+               if (tevent_loop_once(req->transport->socket->event.ctx) != 0) {
                        break;
                }
        }
index eeea03639abee021d36af1d028e4b793847920eb..2d74c5d1f48a31278bd61c2cde4967e3f98f9ce3 100644 (file)
@@ -329,7 +329,7 @@ static void torture_wait_for_oplock_break(struct torture_context *tctx)
        /* Wait .1 seconds for an oplock break */
        ne = tevent_timeval_current_ofs(0, 100000);
 
-       if ((te = event_add_timed(tctx->ev, tmp_ctx, ne, timeout_cb, &timesup))
+       if ((te = tevent_add_timer(tctx->ev, tmp_ctx, ne, timeout_cb, &timesup))
            == NULL)
        {
                torture_comment(tctx, "Failed to wait for an oplock break. "
@@ -338,7 +338,7 @@ static void torture_wait_for_oplock_break(struct torture_context *tctx)
        }
 
        while (!timesup && break_info.count < old_count + 1) {
-               if (event_loop_once(tctx->ev) != 0) {
+               if (tevent_loop_once(tctx->ev) != 0) {
                        torture_comment(tctx, "Failed to wait for an oplock "
                                              "break. test results may not be "
                                              "accurate.");
@@ -3606,7 +3606,7 @@ bool test_smb2_hold_oplock(struct torture_context *tctx,
        }
 
        torture_comment(tctx, "Waiting for oplock events\n");
-       event_loop_wait(ev);
+       tevent_loop_wait(ev);
        smb2_deltree(tree, BASEDIR);
        talloc_free(mem_ctx);
        return true;