diff options
-rw-r--r-- | source3/libsmb/async_smb.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/source3/libsmb/async_smb.c b/source3/libsmb/async_smb.c index 8966794ab6..8336ec255a 100644 --- a/source3/libsmb/async_smb.c +++ b/source3/libsmb/async_smb.c @@ -420,7 +420,7 @@ struct tevent_req *cli_smb_req_create(TALLOC_CTX *mem_ctx, if (cli->timeout) { endtime = timeval_current_ofs_msec(cli->timeout); if (!tevent_req_set_endtime(result, ev, endtime)) { - tevent_req_oom(result); + return result; } } @@ -563,7 +563,9 @@ struct tevent_req *cli_smb_send(TALLOC_CTX *mem_ctx, if (req == NULL) { return NULL; } - + if (!tevent_req_is_in_progress(req)) { + return tevent_req_post(req, ev); + } status = cli_smb_req_send(req); if (!NT_STATUS_IS_OK(status)) { tevent_req_nterror(req, status); |