svn commit: samba r11660 - in branches/SAMBA_4_0/source: libcli/raw
torture
tridge at samba.org
tridge at samba.org
Fri Nov 11 01:38:40 GMT 2005
Author: tridge
Date: 2005-11-11 01:38:39 +0000 (Fri, 11 Nov 2005)
New Revision: 11660
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=11660
Log:
- the libcli/raw/ lib no longer uses the SMBCLI_REQUEST_SEND state, or
the associated send queue
- fixed negnowait to not watch for the SMBCLI_REQUEST_SEND state
Modified:
branches/SAMBA_4_0/source/libcli/raw/clitransport.c
branches/SAMBA_4_0/source/libcli/raw/libcliraw.h
branches/SAMBA_4_0/source/torture/torture.c
Changeset:
Modified: branches/SAMBA_4_0/source/libcli/raw/clitransport.c
===================================================================
--- branches/SAMBA_4_0/source/libcli/raw/clitransport.c 2005-11-11 00:50:40 UTC (rev 11659)
+++ branches/SAMBA_4_0/source/libcli/raw/clitransport.c 2005-11-11 01:38:39 UTC (rev 11660)
@@ -520,9 +520,6 @@
{
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 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);
}
Modified: branches/SAMBA_4_0/source/libcli/raw/libcliraw.h
===================================================================
--- branches/SAMBA_4_0/source/libcli/raw/libcliraw.h 2005-11-11 00:50:40 UTC (rev 11659)
+++ branches/SAMBA_4_0/source/libcli/raw/libcliraw.h 2005-11-11 01:38:39 UTC (rev 11660)
@@ -144,9 +144,6 @@
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 @@
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 */
Modified: branches/SAMBA_4_0/source/torture/torture.c
===================================================================
--- branches/SAMBA_4_0/source/torture/torture.c 2005-11-11 00:50:40 UTC (rev 11659)
+++ branches/SAMBA_4_0/source/torture/torture.c 2005-11-11 01:38:39 UTC (rev 11660)
@@ -900,33 +900,18 @@
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;
More information about the samba-cvs
mailing list