mirror of
https://github.com/samba-team/samba.git
synced 2024-12-23 17:34:34 +03:00
s3: Move deferred_open_queue to smbd_server_connection
This commit is contained in:
parent
cb69d105f5
commit
d20e968cff
@ -65,7 +65,6 @@ time_t last_printer_reload_time = 0;
|
|||||||
structure to hold a linked list of queued messages.
|
structure to hold a linked list of queued messages.
|
||||||
for processing.
|
for processing.
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
struct pending_message_list *deferred_open_queue = NULL;
|
|
||||||
uint32_t common_flags2 = FLAGS2_LONG_PATH_COMPONENTS|FLAGS2_32_BIT_ERROR_CODES|FLAGS2_EXTENDED_ATTRIBUTES;
|
uint32_t common_flags2 = FLAGS2_LONG_PATH_COMPONENTS|FLAGS2_32_BIT_ERROR_CODES|FLAGS2_EXTENDED_ATTRIBUTES;
|
||||||
|
|
||||||
struct smb_srv_trans_enc_ctx *partial_srv_trans_enc_ctx = NULL;
|
struct smb_srv_trans_enc_ctx *partial_srv_trans_enc_ctx = NULL;
|
||||||
|
@ -70,8 +70,6 @@ extern time_t last_printer_reload_time;
|
|||||||
structure to hold a linked list of queued messages.
|
structure to hold a linked list of queued messages.
|
||||||
for processing.
|
for processing.
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
struct pending_message_list;
|
|
||||||
extern struct pending_message_list *deferred_open_queue;
|
|
||||||
extern uint32_t common_flags2;
|
extern uint32_t common_flags2;
|
||||||
|
|
||||||
struct smb_srv_trans_enc_ctx;
|
struct smb_srv_trans_enc_ctx;
|
||||||
@ -447,6 +445,7 @@ struct smbd_smb2_tcon {
|
|||||||
connection_struct *compat_conn;
|
connection_struct *compat_conn;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
struct pending_message_list;
|
||||||
struct pending_auth_data;
|
struct pending_auth_data;
|
||||||
|
|
||||||
struct smbd_server_connection {
|
struct smbd_server_connection {
|
||||||
@ -478,6 +477,9 @@ struct smbd_server_connection {
|
|||||||
/* number of open connections (tcons) */
|
/* number of open connections (tcons) */
|
||||||
int num_tcons_open;
|
int num_tcons_open;
|
||||||
|
|
||||||
|
struct pending_message_list *deferred_open_queue;
|
||||||
|
|
||||||
|
|
||||||
/* open directory handles. */
|
/* open directory handles. */
|
||||||
struct {
|
struct {
|
||||||
struct bitmap *dptr_bmap;
|
struct bitmap *dptr_bmap;
|
||||||
|
@ -641,7 +641,8 @@ static bool push_queued_message(struct smb_request *req,
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
DLIST_ADD_END(deferred_open_queue, msg, struct pending_message_list *);
|
DLIST_ADD_END(req->sconn->deferred_open_queue, msg,
|
||||||
|
struct pending_message_list *);
|
||||||
|
|
||||||
DEBUG(10,("push_message: pushed message length %u on "
|
DEBUG(10,("push_message: pushed message length %u on "
|
||||||
"deferred_open_queue\n", (unsigned int)msg_len));
|
"deferred_open_queue\n", (unsigned int)msg_len));
|
||||||
@ -663,13 +664,13 @@ void remove_deferred_open_message_smb(struct smbd_server_connection *sconn,
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (pml = deferred_open_queue; pml; pml = pml->next) {
|
for (pml = sconn->deferred_open_queue; pml; pml = pml->next) {
|
||||||
if (mid == (uint64_t)SVAL(pml->buf.data,smb_mid)) {
|
if (mid == (uint64_t)SVAL(pml->buf.data,smb_mid)) {
|
||||||
DEBUG(10,("remove_deferred_open_message_smb: "
|
DEBUG(10,("remove_deferred_open_message_smb: "
|
||||||
"deleting mid %llu len %u\n",
|
"deleting mid %llu len %u\n",
|
||||||
(unsigned long long)mid,
|
(unsigned long long)mid,
|
||||||
(unsigned int)pml->buf.length ));
|
(unsigned int)pml->buf.length ));
|
||||||
DLIST_REMOVE(deferred_open_queue, pml);
|
DLIST_REMOVE(sconn->deferred_open_queue, pml);
|
||||||
TALLOC_FREE(pml);
|
TALLOC_FREE(pml);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -692,7 +693,7 @@ void schedule_deferred_open_message_smb(struct smbd_server_connection *sconn,
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (pml = deferred_open_queue; pml; pml = pml->next) {
|
for (pml = sconn->deferred_open_queue; pml; pml = pml->next) {
|
||||||
uint64_t msg_mid = (uint64_t)SVAL(pml->buf.data,smb_mid);
|
uint64_t msg_mid = (uint64_t)SVAL(pml->buf.data,smb_mid);
|
||||||
|
|
||||||
DEBUG(10,("schedule_deferred_open_message_smb: [%d] "
|
DEBUG(10,("schedule_deferred_open_message_smb: [%d] "
|
||||||
@ -730,7 +731,7 @@ void schedule_deferred_open_message_smb(struct smbd_server_connection *sconn,
|
|||||||
|
|
||||||
TALLOC_FREE(pml->te);
|
TALLOC_FREE(pml->te);
|
||||||
pml->te = te;
|
pml->te = te;
|
||||||
DLIST_PROMOTE(deferred_open_queue, pml);
|
DLIST_PROMOTE(sconn->deferred_open_queue, pml);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -752,7 +753,7 @@ bool open_was_deferred(struct smbd_server_connection *sconn, uint64_t mid)
|
|||||||
return open_was_deferred_smb2(sconn, mid);
|
return open_was_deferred_smb2(sconn, mid);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (pml = deferred_open_queue; pml; pml = pml->next) {
|
for (pml = sconn->deferred_open_queue; pml; pml = pml->next) {
|
||||||
if (((uint64_t)SVAL(pml->buf.data,smb_mid)) == mid && !pml->processed) {
|
if (((uint64_t)SVAL(pml->buf.data,smb_mid)) == mid && !pml->processed) {
|
||||||
return True;
|
return True;
|
||||||
}
|
}
|
||||||
@ -769,7 +770,7 @@ static struct pending_message_list *get_deferred_open_message_smb(
|
|||||||
{
|
{
|
||||||
struct pending_message_list *pml;
|
struct pending_message_list *pml;
|
||||||
|
|
||||||
for (pml = deferred_open_queue; pml; pml = pml->next) {
|
for (pml = sconn->deferred_open_queue; pml; pml = pml->next) {
|
||||||
if (((uint64_t)SVAL(pml->buf.data,smb_mid)) == mid) {
|
if (((uint64_t)SVAL(pml->buf.data,smb_mid)) == mid) {
|
||||||
return pml;
|
return pml;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user