summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2012-06-29 13:53:31 -0700
committerJeremy Allison <jra@samba.org>2012-06-30 02:23:39 +0200
commit0d2f6cae418706ac2e72632d1b0187cfa66f9ec9 (patch)
tree39708ab836c067b901aafdb0b2751dc382862a19 /source3
parentb004121d9beb890054b373f96c8145bf8a830065 (diff)
downloadsamba-0d2f6cae418706ac2e72632d1b0187cfa66f9ec9.tar.gz
samba-0d2f6cae418706ac2e72632d1b0187cfa66f9ec9.tar.bz2
samba-0d2f6cae418706ac2e72632d1b0187cfa66f9ec9.zip
Make schedule_deferred_open_message_smb2() return an indication of success.
Diffstat (limited to 'source3')
-rw-r--r--source3/smbd/globals.h2
-rw-r--r--source3/smbd/smb2_create.c14
2 files changed, 9 insertions, 7 deletions
diff --git a/source3/smbd/globals.h b/source3/smbd/globals.h
index 6c1efaf44b..b07ee3addc 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 18c3fb954f..b69f268c9e 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;
}
/*********************************************************