r11660: - the libcli/raw/ lib no longer uses the SMBCLI_REQUEST_SEND state, or
authorAndrew Tridgell <tridge@samba.org>
Fri, 11 Nov 2005 01:38:39 +0000 (01:38 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 18:46:08 +0000 (13:46 -0500)
  the associated send queue

- fixed negnowait to not watch for the SMBCLI_REQUEST_SEND state
(This used to be commit d19235ede5d352d0b0373d204f4357dddde5946f)

source4/libcli/raw/clitransport.c
source4/libcli/raw/libcliraw.h
source4/torture/torture.c

index 2580df4aeb81fc141efd2a7d3ade865c3ae6c560..2aebb92790f43571f67a9f39ea77a1ef0902693e 100644 (file)
@@ -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);
        }
index dfc4dc37b5dba076755989102e2f8937fb138724..decee83eb71ed9392e92540c22af5ecaf8ab684c 100644 (file)
@@ -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 */
index ef59cdb3783b9e9f3485cfc0bfa32abe9ed59786..ed09ddb213a07813ad475f7838e904bd961afec5 100644 (file)
@@ -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;