s3:smbd: pass smbXsrv_connection to schedule_deferred_open_message_smb()
authorStefan Metzmacher <metze@samba.org>
Tue, 16 Sep 2014 05:38:44 +0000 (07:38 +0200)
committerMichael Adam <obnox@samba.org>
Fri, 19 Sep 2014 07:15:12 +0000 (09:15 +0200)
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
source3/smbd/open.c
source3/smbd/process.c
source3/smbd/proto.h

index 7cc26428345ceecc5d017d7d063a50186d3429f6..ccea1e9d7183fb889ba5940adbabffebb94e1718 100644 (file)
@@ -1583,7 +1583,7 @@ static bool request_timed_out(struct timeval request_time,
 }
 
 struct defer_open_state {
-       struct smbd_server_connection *sconn;
+       struct smbXsrv_connection *xconn;
        uint64_t mid;
 };
 
@@ -1624,7 +1624,7 @@ static void defer_open(struct share_mode_lock *lck,
                if (watch_state == NULL) {
                        exit_server("talloc failed");
                }
-               watch_state->sconn = req->sconn;
+               watch_state->xconn = req->xconn;
                watch_state->mid = req->mid;
 
                DEBUG(10, ("defering mid %llu\n",
@@ -1672,7 +1672,7 @@ static void defer_open_done(struct tevent_req *req)
 
        DEBUG(10, ("scheduling mid %llu\n", (unsigned long long)state->mid));
 
-       ret = schedule_deferred_open_message_smb(state->sconn, state->mid);
+       ret = schedule_deferred_open_message_smb(state->xconn, state->mid);
        SMB_ASSERT(ret);
        TALLOC_FREE(state);
 }
index 048d4f8a58bded7440cb9cde5ba567ea0a4cfa56..4da6b75862d4c09a18bed2ecf452f069feac21bc 100644 (file)
@@ -790,9 +790,10 @@ void remove_deferred_open_message_smb(struct smbXsrv_connection *xconn,
  schedule it for immediate processing.
 ****************************************************************************/
 
-bool schedule_deferred_open_message_smb(struct smbd_server_connection *sconn,
+bool schedule_deferred_open_message_smb(struct smbXsrv_connection *xconn,
                                        uint64_t mid)
 {
+       struct smbd_server_connection *sconn = xconn->client->sconn;
        struct pending_message_list *pml;
        int i = 0;
 
index 708f3892e1caa0eb796f755f22c9b25c1c11e227..68c2da24bc1e4aa04656d726844365bc7cbcace2 100644 (file)
@@ -751,7 +751,7 @@ int srv_set_message(char *buf,
                         bool zero);
 void remove_deferred_open_message_smb(struct smbXsrv_connection *xconn,
                                      uint64_t mid);
-bool schedule_deferred_open_message_smb(struct smbd_server_connection *sconn,
+bool schedule_deferred_open_message_smb(struct smbXsrv_connection *xconn,
                                        uint64_t mid);
 bool open_was_deferred(struct smbXsrv_connection *xconn, uint64_t mid);
 bool get_deferred_open_message_state(struct smb_request *smbreq,