diff options
-rw-r--r-- | source4/libcli/raw/clitransport.c | 6 | ||||
-rw-r--r-- | source4/libcli/raw/libcliraw.h | 4 | ||||
-rw-r--r-- | source4/torture/torture.c | 19 |
3 files changed, 2 insertions, 27 deletions
diff --git a/source4/libcli/raw/clitransport.c b/source4/libcli/raw/clitransport.c index 2580df4aeb..2aebb92790 100644 --- a/source4/libcli/raw/clitransport.c +++ b/source4/libcli/raw/clitransport.c @@ -520,9 +520,6 @@ static void smbcli_timeout_handler(struct event_context *ev, struct timed_event { struct smbcli_request *req = talloc_get_type(private, struct smbcli_request); - if (req->state == SMBCLI_REQUEST_SEND) { - DLIST_REMOVE(req->transport->pending_send, req); - } if (req->state == SMBCLI_REQUEST_RECV) { DLIST_REMOVE(req->transport->pending_recv, req); } @@ -540,9 +537,6 @@ static void smbcli_timeout_handler(struct event_context *ev, struct timed_event static int smbcli_request_destructor(void *ptr) { struct smbcli_request *req = talloc_get_type(ptr, struct smbcli_request); - if (req->state == SMBCLI_REQUEST_SEND) { - DLIST_REMOVE(req->transport->pending_send, req); - } if (req->state == SMBCLI_REQUEST_RECV) { DLIST_REMOVE(req->transport->pending_recv, req); } diff --git a/source4/libcli/raw/libcliraw.h b/source4/libcli/raw/libcliraw.h index dfc4dc37b5..decee83eb7 100644 --- a/source4/libcli/raw/libcliraw.h +++ b/source4/libcli/raw/libcliraw.h @@ -144,9 +144,6 @@ struct smbcli_transport { void *private; } oplock; - /* a list of async requests that are pending for send on this connection */ - struct smbcli_request *pending_send; - /* a list of async requests that are pending for receive on this connection */ struct smbcli_request *pending_recv; @@ -199,7 +196,6 @@ struct smbcli_tree { a client request moves between the following 4 states. */ enum smbcli_request_state {SMBCLI_REQUEST_INIT, /* we are creating the request */ - SMBCLI_REQUEST_SEND, /* the request is in the outgoing socket Q */ SMBCLI_REQUEST_RECV, /* we are waiting for a matching reply */ SMBCLI_REQUEST_DONE, /* the request is finished */ SMBCLI_REQUEST_ERROR}; /* a packet or transport level error has occurred */ diff --git a/source4/torture/torture.c b/source4/torture/torture.c index ef59cdb378..ed09ddb213 100644 --- a/source4/torture/torture.c +++ b/source4/torture/torture.c @@ -900,33 +900,18 @@ static BOOL run_negprot_nowait(void) printf("Filling send buffer\n"); - for (i=0;i<10000;i++) { + for (i=0;i<1000;i++) { struct smbcli_request *req; time_t t1 = time(NULL); req = smb_raw_negotiate_send(cli->transport, PROTOCOL_NT1); - while (req->state == SMBCLI_REQUEST_SEND && time(NULL) < t1+5) { - smbcli_transport_process(cli->transport); - } + smbcli_transport_process(cli->transport); if (req->state == SMBCLI_REQUEST_ERROR) { printf("Failed to fill pipe - %s\n", nt_errstr(req->status)); torture_close_connection(cli); return correct; } - if (req->state == SMBCLI_REQUEST_SEND) { - break; - } - } - - if (i == 10000) { - printf("send buffer failed to fill\n"); - if (!torture_close_connection(cli)) { - correct = False; - } - return correct; } - printf("send buffer filled after %d requests\n", i); - printf("Opening secondary connection\n"); if (!torture_open_connection(&cli2)) { return False; |