mirror of
https://github.com/samba-team/samba.git
synced 2025-08-04 08:22:08 +03:00
s3: Add msg_ctx_to_sconn
This commit is contained in:
@ -102,6 +102,19 @@ int num_children = 0;
|
||||
|
||||
struct smbd_server_connection *smbd_server_conn = NULL;
|
||||
|
||||
struct smbd_server_connection *msg_ctx_to_sconn(struct messaging_context *msg_ctx)
|
||||
{
|
||||
struct server_id my_id, msg_id;
|
||||
|
||||
my_id = messaging_server_id(smbd_server_conn->msg_ctx);
|
||||
msg_id = messaging_server_id(msg_ctx);
|
||||
|
||||
if (!procid_equal(&my_id, &msg_id)) {
|
||||
return NULL;
|
||||
}
|
||||
return smbd_server_conn;
|
||||
}
|
||||
|
||||
struct messaging_context *smbd_messaging_context(void)
|
||||
{
|
||||
return server_messaging_context();
|
||||
|
@ -585,4 +585,6 @@ struct smbd_server_connection {
|
||||
|
||||
extern struct smbd_server_connection *smbd_server_conn;
|
||||
|
||||
struct smbd_server_connection *msg_ctx_to_sconn(struct messaging_context *msg_ctx);
|
||||
|
||||
void smbd_init_globals(void);
|
||||
|
Reference in New Issue
Block a user