s4:torture/smb2: use tctx->ev as event context for polling
authorStefan Metzmacher <metze@samba.org>
Thu, 22 Sep 2011 19:30:13 +0000 (21:30 +0200)
committerStefan Metzmacher <metze@samba.org>
Thu, 24 Nov 2011 18:02:33 +0000 (19:02 +0100)
metze

source4/torture/smb2/lock.c
source4/torture/smb2/notify.c
source4/torture/smb2/oplock.c

index aee82929c1fa2356bf92050466f6005e673bf1e3..3691830ce4758963a2ad0a899ee792fb1af69fc0 100644 (file)
@@ -62,7 +62,7 @@
 
 #define WAIT_FOR_ASYNC_RESPONSE(req) \
        while (!req->cancel.can_cancel && req->state <= SMB2_REQUEST_RECV) { \
-               if (tevent_loop_once(req->transport->socket->event.ctx) != 0) { \
+               if (tevent_loop_once(torture->ev) != 0) { \
                        break; \
                } \
        }
index 0f0e866098a7ba94e2a339b7589ebd730f431315..0e6d7025e2554ded97933b0454b7f0bb9e50a05c 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 (tevent_loop_once(req->transport->socket->event.ctx) != 0) {
+               if (tevent_loop_once(torture->ev) != 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 (tevent_loop_once(req->transport->socket->event.ctx) != 0) {
+               if (tevent_loop_once(torture->ev) != 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 (tevent_loop_once(req->transport->socket->event.ctx) != 0) {
+               if (tevent_loop_once(torture->ev) != 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 (tevent_loop_once(req->transport->socket->event.ctx) != 0) {
+               if (tevent_loop_once(torture->ev) != 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 (tevent_loop_once(req->transport->socket->event.ctx) != 0) {
+               if (tevent_loop_once(torture->ev) != 0) {
                        break;
                }
        }
index 5b12e135b7843668d2a06f4306a384da9279e17c..d4899439860ad0ea7b6530aa7a1152c7ec02f44e 100644 (file)
@@ -3582,8 +3582,7 @@ bool test_smb2_hold_oplock(struct torture_context *tctx,
                           struct smb2_tree *tree)
 {
        struct torture_context *mem_ctx = talloc_new(tctx);
-       struct tevent_context *ev =
-               (struct tevent_context *)tree->session->transport->socket->event.ctx;
+       struct tevent_context *ev = tctx->ev;
        int i;
        struct smb2_handle h;
        NTSTATUS status;