mirror of
https://github.com/samba-team/samba.git
synced 2025-01-25 06:04:04 +03:00
r22911: Pass a messaging_context to message_send_all
This commit is contained in:
parent
27224922cf
commit
cc92ce665d
@ -659,7 +659,8 @@ static int traverse_fn(TDB_CONTEXT *the_tdb, TDB_DATA kbuf, TDB_DATA dbuf, void
|
|||||||
*
|
*
|
||||||
* @retval True for success.
|
* @retval True for success.
|
||||||
**/
|
**/
|
||||||
BOOL message_send_all(int msg_type,
|
BOOL message_send_all(struct messaging_context *msg_ctx,
|
||||||
|
int msg_type,
|
||||||
const void *buf, size_t len,
|
const void *buf, size_t len,
|
||||||
BOOL duplicates_allowed,
|
BOOL duplicates_allowed,
|
||||||
int *n_sent)
|
int *n_sent)
|
||||||
|
@ -40,8 +40,8 @@ static void send_repl_message(uint32 low_serial)
|
|||||||
{
|
{
|
||||||
DEBUG(3, ("sending replication message, serial = 0x%04x\n",
|
DEBUG(3, ("sending replication message, serial = 0x%04x\n",
|
||||||
low_serial));
|
low_serial));
|
||||||
message_send_all(MSG_SMB_SAM_REPL, &low_serial,
|
message_send_all(nmbd_messaging_context(), MSG_SMB_SAM_REPL,
|
||||||
sizeof(low_serial), False, NULL);
|
&low_serial, sizeof(low_serial), False, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
|
@ -76,7 +76,8 @@ Send a message to smbd to do a sam synchronisation
|
|||||||
static void send_sync_message(void)
|
static void send_sync_message(void)
|
||||||
{
|
{
|
||||||
DEBUG(3, ("sending sam synchronisation message\n"));
|
DEBUG(3, ("sending sam synchronisation message\n"));
|
||||||
message_send_all(MSG_SMB_SAM_SYNC, NULL, 0, False, NULL);
|
message_send_all(smbd_messaging_context(), MSG_SMB_SAM_SYNC, NULL, 0,
|
||||||
|
False, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*************************************************************************
|
/*************************************************************************
|
||||||
|
@ -311,7 +311,8 @@ WERROR delete_printer_hook( NT_USER_TOKEN *token, const char *sharename )
|
|||||||
|
|
||||||
if ( (ret = smbrun(command, NULL)) == 0 ) {
|
if ( (ret = smbrun(command, NULL)) == 0 ) {
|
||||||
/* Tell everyone we updated smb.conf. */
|
/* Tell everyone we updated smb.conf. */
|
||||||
message_send_all(MSG_SMB_CONF_UPDATED, NULL, 0, False, NULL);
|
message_send_all(smbd_messaging_context(),
|
||||||
|
MSG_SMB_CONF_UPDATED, NULL, 0, False, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( is_print_op )
|
if ( is_print_op )
|
||||||
@ -6255,7 +6256,8 @@ BOOL add_printer_hook(NT_USER_TOKEN *token, NT_PRINTER_INFO_LEVEL *printer)
|
|||||||
|
|
||||||
if ( (ret = smbrun(command, &fd)) == 0 ) {
|
if ( (ret = smbrun(command, &fd)) == 0 ) {
|
||||||
/* Tell everyone we updated smb.conf. */
|
/* Tell everyone we updated smb.conf. */
|
||||||
message_send_all(MSG_SMB_CONF_UPDATED, NULL, 0, False, NULL);
|
message_send_all(smbd_messaging_context(),
|
||||||
|
MSG_SMB_CONF_UPDATED, NULL, 0, False, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( is_print_op )
|
if ( is_print_op )
|
||||||
|
@ -1421,7 +1421,8 @@ static WERROR add_share(const char *share_name, const char *path,
|
|||||||
|
|
||||||
if ( (ret = smbrun(command, NULL)) == 0 ) {
|
if ( (ret = smbrun(command, NULL)) == 0 ) {
|
||||||
/* Tell everyone we updated smb.conf. */
|
/* Tell everyone we updated smb.conf. */
|
||||||
message_send_all(MSG_SMB_CONF_UPDATED,
|
message_send_all(smbd_messaging_context(),
|
||||||
|
MSG_SMB_CONF_UPDATED,
|
||||||
NULL, 0, False, NULL);
|
NULL, 0, False, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1517,7 +1518,8 @@ static WERROR delete_share(const char *sharename,
|
|||||||
|
|
||||||
if ( (ret = smbrun(command, NULL)) == 0 ) {
|
if ( (ret = smbrun(command, NULL)) == 0 ) {
|
||||||
/* Tell everyone we updated smb.conf. */
|
/* Tell everyone we updated smb.conf. */
|
||||||
message_send_all(MSG_SMB_CONF_UPDATED,
|
message_send_all(smbd_messaging_context(),
|
||||||
|
MSG_SMB_CONF_UPDATED,
|
||||||
NULL, 0, False, NULL);
|
NULL, 0, False, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1575,7 +1577,8 @@ static WERROR change_share(const char *share_name, const char *path,
|
|||||||
|
|
||||||
if ( (ret = smbrun(command, NULL)) == 0 ) {
|
if ( (ret = smbrun(command, NULL)) == 0 ) {
|
||||||
/* Tell everyone we updated smb.conf. */
|
/* Tell everyone we updated smb.conf. */
|
||||||
message_send_all(MSG_SMB_CONF_UPDATED,
|
message_send_all(smbd_messaging_context(),
|
||||||
|
MSG_SMB_CONF_UPDATED,
|
||||||
NULL, 0, False, NULL);
|
NULL, 0, False, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1894,7 +1894,8 @@ static BOOL api_RNetShareAdd(connection_struct *conn,uint16 vuid,
|
|||||||
goto error_exit;
|
goto error_exit;
|
||||||
} else {
|
} else {
|
||||||
SAFE_FREE(command);
|
SAFE_FREE(command);
|
||||||
message_send_all(MSG_SMB_CONF_UPDATED, NULL, 0,
|
message_send_all(smbd_messaging_context(),
|
||||||
|
MSG_SMB_CONF_UPDATED, NULL, 0,
|
||||||
False, NULL);
|
False, NULL);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
@ -292,7 +292,8 @@ BOOL stat_cache_lookup(connection_struct *conn, pstring name, pstring dirpath,
|
|||||||
void send_stat_cache_delete_message(const char *name)
|
void send_stat_cache_delete_message(const char *name)
|
||||||
{
|
{
|
||||||
#ifdef DEVELOPER
|
#ifdef DEVELOPER
|
||||||
message_send_all(MSG_SMB_STAT_CACHE_DELETE,
|
message_send_all(smbd_messaging_context(),
|
||||||
|
MSG_SMB_STAT_CACHE_DELETE,
|
||||||
name,
|
name,
|
||||||
strlen(name)+1,
|
strlen(name)+1,
|
||||||
True,
|
True,
|
||||||
|
@ -60,7 +60,7 @@ static BOOL send_message(struct messaging_context *msg_ctx,
|
|||||||
messaging_send_buf(msg_ctx, pid, msg_type,
|
messaging_send_buf(msg_ctx, pid, msg_type,
|
||||||
(uint8 *)buf, len));
|
(uint8 *)buf, len));
|
||||||
|
|
||||||
ret = message_send_all(msg_type, buf, len, duplicates,
|
ret = message_send_all(msg_ctx, msg_type, buf, len, duplicates,
|
||||||
&n_sent);
|
&n_sent);
|
||||||
DEBUG(10,("smbcontrol/send_message: broadcast message to "
|
DEBUG(10,("smbcontrol/send_message: broadcast message to "
|
||||||
"%d processes\n", n_sent));
|
"%d processes\n", n_sent));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user