summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2007-05-15 10:50:25 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:52:29 -0500
commitd15e4d30e667c0b062487790a9ddda350e0dee81 (patch)
tree58f22157f3359eb09d79956470ba342cfb087c8e /source4
parente9dcc9a3daa38efa56b9ee3a8f453a5d2a938713 (diff)
downloadsamba-d15e4d30e667c0b062487790a9ddda350e0dee81.tar.gz
samba-d15e4d30e667c0b062487790a9ddda350e0dee81.tar.bz2
samba-d15e4d30e667c0b062487790a9ddda350e0dee81.zip
r22894: don't send a 2nd request before the last one returned (at least with
STATUS_PENDING) otherwise longhorn beta3 just drops the connection metze (This used to be commit 503644a5e3b005e0660aca33a880de8d87d0d8aa)
Diffstat (limited to 'source4')
-rw-r--r--source4/torture/smb2/notify.c32
1 files changed, 32 insertions, 0 deletions
diff --git a/source4/torture/smb2/notify.c b/source4/torture/smb2/notify.c
index 003f6d6cd6..6059628a08 100644
--- a/source4/torture/smb2/notify.c
+++ b/source4/torture/smb2/notify.c
@@ -27,6 +27,9 @@
#include "torture/torture.h"
#include "torture/smb2/proto.h"
+#include "libcli/raw/libcliraw.h"
+#include "lib/events/events.h"
+
#define CHECK_STATUS(status, correct) do { \
if (!NT_STATUS_EQUAL(status, correct)) { \
printf("(%s) Incorrect status %s - should be %s\n", \
@@ -71,6 +74,12 @@ static BOOL test_valid_request(TALLOC_CTX *mem_ctx, struct smb2_tree *tree)
n.in.unknown = 0x00000000;
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) {
+ break;
+ }
+ }
+
status = torture_setup_complex_file(tree, FNAME);
CHECK_STATUS(status, NT_STATUS_OK);
@@ -87,6 +96,12 @@ static BOOL test_valid_request(TALLOC_CTX *mem_ctx, struct smb2_tree *tree)
n.in.buffer_size = 0x00000000;
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) {
+ break;
+ }
+ }
+
status = torture_setup_complex_file(tree, FNAME);
CHECK_STATUS(status, NT_STATUS_OK);
@@ -100,6 +115,12 @@ static BOOL test_valid_request(TALLOC_CTX *mem_ctx, struct smb2_tree *tree)
n.in.buffer_size = 0x00080000;
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) {
+ break;
+ }
+ }
+
status = torture_setup_complex_file(tree, FNAME);
CHECK_STATUS(status, NT_STATUS_OK);
@@ -126,6 +147,12 @@ static BOOL test_valid_request(TALLOC_CTX *mem_ctx, struct smb2_tree *tree)
n.in.unknown = 0x00000000;
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) {
+ break;
+ }
+ }
+
status = torture_setup_complex_file(tree, FNAME);
CHECK_STATUS(status, NT_STATUS_OK);
@@ -134,6 +161,11 @@ static BOOL test_valid_request(TALLOC_CTX *mem_ctx, struct smb2_tree *tree)
n.in.buffer_size = 0x00080000;
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) {
+ break;
+ }
+ }
status = torture_setup_complex_file(tree, FNAME);
CHECK_STATUS(status, NT_STATUS_OK);