diff options
Diffstat (limited to 'source4/torture')
-rw-r--r-- | source4/torture/basic/scanner.c | 6 | ||||
-rw-r--r-- | source4/torture/gentest.c | 19 |
2 files changed, 8 insertions, 17 deletions
diff --git a/source4/torture/basic/scanner.c b/source4/torture/basic/scanner.c index cf513414e8..20a467100b 100644 --- a/source4/torture/basic/scanner.c +++ b/source4/torture/basic/scanner.c @@ -537,7 +537,8 @@ BOOL torture_smb_scan(int dummy) } usleep(10000); - if (cli_transport_pending(cli->transport)) { + cli_transport_process(cli->transport); + if (req->state > CLI_REQUEST_RECV) { status = cli_request_simple_recv(req); printf("op=0x%x status=%s\n", op, nt_errstr(status)); torture_close_connection(cli); @@ -545,7 +546,8 @@ BOOL torture_smb_scan(int dummy) } sleep(1); - if (cli_transport_pending(cli->transport)) { + cli_transport_process(cli->transport); + if (req->state > CLI_REQUEST_RECV) { status = cli_request_simple_recv(req); printf("op=0x%x status=%s\n", op, nt_errstr(status)); } else { diff --git a/source4/torture/gentest.c b/source4/torture/gentest.c index 016c19fd5b..e45d9f0124 100644 --- a/source4/torture/gentest.c +++ b/source4/torture/gentest.c @@ -185,7 +185,7 @@ static BOOL connect_servers(void) } cli_oplock_handler(servers[i].cli[j]->transport, oplock_handler, NULL); - cli_transport_idle_handler(servers[i].cli[j]->transport, idle_func, 10, NULL); + cli_transport_idle_handler(servers[i].cli[j]->transport, idle_func, 1, NULL); } } @@ -764,13 +764,8 @@ static void idle_func(struct cli_transport *transport, void *private) for (i=0;i<NSERVERS;i++) { for (j=0;j<NINSTANCES;j++) { if (servers[i].cli[j] && - transport != servers[i].cli[j]->transport && - cli_transport_pending(servers[i].cli[j]->transport)) { - if (!cli_request_receive_next(servers[i].cli[j]->transport)) { - printf("Connection to server %d instance %d died!\n", - i, j); - exit(1); - } + transport != servers[i].cli[j]->transport) { + cli_transport_process(servers[i].cli[j]->transport); } } } @@ -808,13 +803,7 @@ static void check_pending(void) for (j=0;j<NINSTANCES;j++) { for (i=0;i<NSERVERS;i++) { - if (cli_transport_pending(servers[i].cli[j]->transport)) { - if (!cli_request_receive_next(servers[i].cli[j]->transport)) { - printf("Connection to server %d instance %d died!\n", - i, j); - exit(1); - } - } + cli_transport_process(servers[i].cli[j]->transport); } } } |