summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2012-06-29 13:56:26 -0700
committerJeremy Allison <jra@samba.org>2012-06-30 02:23:39 +0200
commit6617c2c1f586b355950e41edb5ca655b4f6dca54 (patch)
tree21f3e07366aa844674e88018a5f883c3cab397db
parent0d2f6cae418706ac2e72632d1b0187cfa66f9ec9 (diff)
downloadsamba-6617c2c1f586b355950e41edb5ca655b4f6dca54.tar.gz
samba-6617c2c1f586b355950e41edb5ca655b4f6dca54.tar.bz2
samba-6617c2c1f586b355950e41edb5ca655b4f6dca54.zip
Make schedule_deferred_open_message_smb() return an indication of success.
-rw-r--r--source3/smbd/process.c9
-rw-r--r--source3/smbd/proto.h2
2 files changed, 6 insertions, 5 deletions
diff --git a/source3/smbd/process.c b/source3/smbd/process.c
index 55a125fb88..f8757faae0 100644
--- a/source3/smbd/process.c
+++ b/source3/smbd/process.c
@@ -718,15 +718,14 @@ void remove_deferred_open_message_smb(struct smbd_server_connection *sconn,
schedule it for immediate processing.
****************************************************************************/
-void schedule_deferred_open_message_smb(struct smbd_server_connection *sconn,
+bool schedule_deferred_open_message_smb(struct smbd_server_connection *sconn,
uint64_t mid)
{
struct pending_message_list *pml;
int i = 0;
if (sconn->using_smb2) {
- schedule_deferred_open_message_smb2(sconn, mid);
- return;
+ return schedule_deferred_open_message_smb2(sconn, mid);
}
for (pml = sconn->deferred_open_queue; pml; pml = pml->next) {
@@ -768,13 +767,15 @@ void schedule_deferred_open_message_smb(struct smbd_server_connection *sconn,
TALLOC_FREE(pml->te);
pml->te = te;
DLIST_PROMOTE(sconn->deferred_open_queue, pml);
- return;
+ return true;
}
}
DEBUG(10,("schedule_deferred_open_message_smb: failed to "
"find message mid %llu\n",
(unsigned long long)mid ));
+
+ return false;
}
/****************************************************************************
diff --git a/source3/smbd/proto.h b/source3/smbd/proto.h
index 35a677c079..f566b3258d 100644
--- a/source3/smbd/proto.h
+++ b/source3/smbd/proto.h
@@ -752,7 +752,7 @@ int srv_set_message(char *buf,
bool zero);
void remove_deferred_open_message_smb(struct smbd_server_connection *sconn,
uint64_t mid);
-void schedule_deferred_open_message_smb(struct smbd_server_connection *sconn,
+bool schedule_deferred_open_message_smb(struct smbd_server_connection *sconn,
uint64_t mid);
bool open_was_deferred(struct smbd_server_connection *sconn, uint64_t mid);
bool get_deferred_open_message_state(struct smb_request *smbreq,