1
0
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:
Volker Lendecke
2010-09-19 21:09:18 +02:00
parent fba8e326f8
commit fb2f0c5bdd
2 changed files with 15 additions and 0 deletions

View File

@ -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();

View File

@ -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);