mirror of
https://github.com/samba-team/samba.git
synced 2025-01-11 05:18:09 +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.
|
||||
**/
|
||||
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,
|
||||
BOOL duplicates_allowed,
|
||||
int *n_sent)
|
||||
|
@ -40,8 +40,8 @@ static void send_repl_message(uint32 low_serial)
|
||||
{
|
||||
DEBUG(3, ("sending replication message, serial = 0x%04x\n",
|
||||
low_serial));
|
||||
message_send_all(MSG_SMB_SAM_REPL, &low_serial,
|
||||
sizeof(low_serial), False, NULL);
|
||||
message_send_all(nmbd_messaging_context(), MSG_SMB_SAM_REPL,
|
||||
&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)
|
||||
{
|
||||
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 ) {
|
||||
/* 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 )
|
||||
@ -6255,7 +6256,8 @@ BOOL add_printer_hook(NT_USER_TOKEN *token, NT_PRINTER_INFO_LEVEL *printer)
|
||||
|
||||
if ( (ret = smbrun(command, &fd)) == 0 ) {
|
||||
/* 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 )
|
||||
|
@ -1421,7 +1421,8 @@ static WERROR add_share(const char *share_name, const char *path,
|
||||
|
||||
if ( (ret = smbrun(command, NULL)) == 0 ) {
|
||||
/* 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);
|
||||
}
|
||||
|
||||
@ -1517,7 +1518,8 @@ static WERROR delete_share(const char *sharename,
|
||||
|
||||
if ( (ret = smbrun(command, NULL)) == 0 ) {
|
||||
/* 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);
|
||||
}
|
||||
|
||||
@ -1575,7 +1577,8 @@ static WERROR change_share(const char *share_name, const char *path,
|
||||
|
||||
if ( (ret = smbrun(command, NULL)) == 0 ) {
|
||||
/* 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);
|
||||
}
|
||||
|
||||
|
@ -1894,7 +1894,8 @@ static BOOL api_RNetShareAdd(connection_struct *conn,uint16 vuid,
|
||||
goto error_exit;
|
||||
} else {
|
||||
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);
|
||||
}
|
||||
} 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)
|
||||
{
|
||||
#ifdef DEVELOPER
|
||||
message_send_all(MSG_SMB_STAT_CACHE_DELETE,
|
||||
message_send_all(smbd_messaging_context(),
|
||||
MSG_SMB_STAT_CACHE_DELETE,
|
||||
name,
|
||||
strlen(name)+1,
|
||||
True,
|
||||
|
@ -60,7 +60,7 @@ static BOOL send_message(struct messaging_context *msg_ctx,
|
||||
messaging_send_buf(msg_ctx, pid, msg_type,
|
||||
(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);
|
||||
DEBUG(10,("smbcontrol/send_message: broadcast message to "
|
||||
"%d processes\n", n_sent));
|
||||
|
Loading…
Reference in New Issue
Block a user