diff options
author | Volker Lendecke <vl@samba.org> | 2011-03-27 17:34:36 +0200 |
---|---|---|
committer | Volker Lendecke <vl@samba.org> | 2011-03-27 19:04:11 +0200 |
commit | ffef3aa809eac020efd316c1922c50538d271a4f (patch) | |
tree | 58fc50111e0f5ae321e76ec5410e277121c31d4b /source3/torture | |
parent | a60ba5461855825c71e290f03fa1182210f87cae (diff) | |
download | samba-ffef3aa809eac020efd316c1922c50538d271a4f.tar.gz samba-ffef3aa809eac020efd316c1922c50538d271a4f.tar.bz2 samba-ffef3aa809eac020efd316c1922c50538d271a4f.zip |
s3: Replace cli_negprot_sendsync() by cli_negprot_send()
Diffstat (limited to 'source3/torture')
-rw-r--r-- | source3/torture/torture.c | 24 |
1 files changed, 22 insertions, 2 deletions
diff --git a/source3/torture/torture.c b/source3/torture/torture.c index ebb305fbe1..fcd0e5726d 100644 --- a/source3/torture/torture.c +++ b/source3/torture/torture.c @@ -2776,21 +2776,41 @@ static void rand_buf(char *buf, int len) /* send smb negprot commands, not reading the response */ static bool run_negprot_nowait(int dummy) { + struct tevent_context *ev; int i; struct cli_state *cli; bool correct = True; printf("starting negprot nowait test\n"); + ev = tevent_context_init(talloc_tos()); + if (ev == NULL) { + return false; + } + if (!(cli = open_nbt_connection())) { + TALLOC_FREE(ev); return False; } for (i=0;i<50000;i++) { - cli_negprot_sendsync(cli); + struct tevent_req *req; + + req = cli_negprot_send(ev, ev, cli); + if (req == NULL) { + TALLOC_FREE(ev); + return false; + } + if (!tevent_req_poll(req, ev)) { + d_fprintf(stderr, "tevent_req_poll failed: %s\n", + strerror(errno)); + TALLOC_FREE(ev); + return false; + } + TALLOC_FREE(req); } - if (!torture_close_connection(cli)) { + if (torture_close_connection(cli)) { correct = False; } |