diff options
author | Jeremy Allison <jra@samba.org> | 2012-06-29 13:53:31 -0700 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2012-06-30 02:23:39 +0200 |
commit | 0d2f6cae418706ac2e72632d1b0187cfa66f9ec9 (patch) | |
tree | 39708ab836c067b901aafdb0b2751dc382862a19 /source3 | |
parent | b004121d9beb890054b373f96c8145bf8a830065 (diff) | |
download | samba-0d2f6cae418706ac2e72632d1b0187cfa66f9ec9.tar.gz samba-0d2f6cae418706ac2e72632d1b0187cfa66f9ec9.tar.xz samba-0d2f6cae418706ac2e72632d1b0187cfa66f9ec9.zip |
Make schedule_deferred_open_message_smb2() return an indication of success.
Diffstat (limited to 'source3')
-rw-r--r-- | source3/smbd/globals.h | 2 | ||||
-rw-r--r-- | source3/smbd/smb2_create.c | 14 |
2 files changed, 9 insertions, 7 deletions
diff --git a/source3/smbd/globals.h b/source3/smbd/globals.h index 6c1efaf44bd..b07ee3addca 100644 --- a/source3/smbd/globals.h +++ b/source3/smbd/globals.h @@ -310,7 +310,7 @@ bool open_was_deferred_smb2(struct smbd_server_connection *sconn, uint64_t mid); void remove_deferred_open_message_smb2( struct smbd_server_connection *sconn, uint64_t mid); -void schedule_deferred_open_message_smb2( +bool schedule_deferred_open_message_smb2( struct smbd_server_connection *sconn, uint64_t mid); bool push_deferred_open_message_smb2(struct smbd_smb2_request *smb2req, struct timeval request_time, diff --git a/source3/smbd/smb2_create.c b/source3/smbd/smb2_create.c index 18c3fb954f8..b69f268c9e6 100644 --- a/source3/smbd/smb2_create.c +++ b/source3/smbd/smb2_create.c @@ -1036,7 +1036,7 @@ static void smbd_smb2_create_request_dispatch_immediate(struct tevent_context *c } } -void schedule_deferred_open_message_smb2( +bool schedule_deferred_open_message_smb2( struct smbd_server_connection *sconn, uint64_t mid) { struct smbd_smb2_create_state *state = NULL; @@ -1048,18 +1048,18 @@ void schedule_deferred_open_message_smb2( DEBUG(10,("schedule_deferred_open_message_smb2: " "can't find mid %llu\n", (unsigned long long)mid )); - return; + return false; } if (!smb2req->subreq) { - return; + return false; } if (!tevent_req_is_in_progress(smb2req->subreq)) { - return; + return false; } state = tevent_req_data(smb2req->subreq, struct smbd_smb2_create_state); if (!state) { - return; + return false; } /* Ensure we don't have any outstanding timer event. */ @@ -1080,7 +1080,7 @@ void schedule_deferred_open_message_smb2( if (!state->im) { smbd_server_connection_terminate(smb2req->sconn, nt_errstr(NT_STATUS_NO_MEMORY)); - return; + return false; } DEBUG(10,("schedule_deferred_open_message_smb2: " @@ -1091,6 +1091,8 @@ void schedule_deferred_open_message_smb2( smb2req->sconn->ev_ctx, smbd_smb2_create_request_dispatch_immediate, smb2req); + + return true; } /********************************************************* |