bool message_send_all(struct messaging_context *msg_ctx,
int msg_type,
- const void *buf, size_t len,
- int *n_sent);
+ const void *buf, size_t len);
#endif
* applications that use it. When we need efficient broadcast we can add
* it.
*
- * @param n_sent Set to the number of messages sent. This should be
- * equal to the number of processes, but be careful for races.
- *
* @retval True for success.
**/
bool message_send_all(struct messaging_context *msg_ctx,
int msg_type,
- const void *buf, size_t len,
- int *n_sent)
+ const void *buf, size_t len)
{
struct msg_all msg_all;
msg_all.msg_ctx = msg_ctx;
serverid_traverse(traverse_fn, &msg_all);
- if (n_sent)
- *n_sent = msg_all.n_sent;
return true;
}
message_send_all(server_messaging_context(),
ID_CACHE_DELETE,
msg_data,
- strlen(msg_data) + 1,
- NULL);
+ strlen(msg_data) + 1);
TALLOC_FREE(msg_data);
return status;
*/
delete_and_reload_printers_full(ev, msg_ctx);
- message_send_all(msg_ctx, MSG_PRINTER_PCAP, NULL, 0, NULL);
+ message_send_all(msg_ctx, MSG_PRINTER_PCAP, NULL, 0);
}
struct bq_state {
}
unbecome_root();
- message_send_all(p->msg_ctx, MSG_SMB_CONF_UPDATED, NULL, 0, NULL);
+ message_send_all(p->msg_ctx, MSG_SMB_CONF_UPDATED, NULL, 0);
for (sc = sc_set->scs; sc; sc = sc->next) {
struct fss_sc_smap *sm;
for (sm = sc->smaps; sm; sm = sm->next)
ret = NT_STATUS_UNSUCCESSFUL;
goto err_cancel;
}
- message_send_all(msg_ctx, MSG_SMB_CONF_UPDATED, NULL, 0, NULL);
+ message_send_all(msg_ctx, MSG_SMB_CONF_UPDATED, NULL, 0);
} else {
ret = NT_STATUS_OK;
goto err_cancel;
}
message_send_all(p->msg_ctx, MSG_SMB_FORCE_TDIS, sc_smap->sc_share_name,
- strlen(sc_smap->sc_share_name) + 1, NULL);
+ strlen(sc_smap->sc_share_name) + 1);
if (sc->smaps_count > 1) {
/* do not delete the underlying snapshot - still in use */
ret = smbrun(command, NULL, NULL);
if (ret == 0) {
/* Tell everyone we updated smb.conf. */
- message_send_all(msg_ctx, MSG_SMB_CONF_UPDATED, NULL, 0, NULL);
+ message_send_all(msg_ctx, MSG_SMB_CONF_UPDATED, NULL, 0);
}
if ( is_print_op )
ret = smbrun(command, &fd, NULL);
if (ret == 0) {
/* Tell everyone we updated smb.conf. */
- message_send_all(msg_ctx, MSG_SMB_CONF_UPDATED, NULL, 0, NULL);
+ message_send_all(msg_ctx, MSG_SMB_CONF_UPDATED, NULL, 0);
}
if ( is_print_op )
if (ret == 0) {
/* Tell everyone we updated smb.conf. */
message_send_all(p->msg_ctx, MSG_SMB_CONF_UPDATED,
- NULL, 0, NULL);
+ NULL, 0);
}
if ( is_disk_op )
ret = smbrun(command, NULL, NULL);
if (ret == 0) {
/* Tell everyone we updated smb.conf. */
- message_send_all(p->msg_ctx, MSG_SMB_CONF_UPDATED, NULL, 0,
- NULL);
+ message_send_all(p->msg_ctx, MSG_SMB_CONF_UPDATED, NULL, 0);
}
if ( is_disk_op )
ret = smbrun(command, NULL, NULL);
if (ret == 0) {
/* Tell everyone we updated smb.conf. */
- message_send_all(p->msg_ctx, MSG_SMB_CONF_UPDATED, NULL, 0,
- NULL);
+ message_send_all(p->msg_ctx, MSG_SMB_CONF_UPDATED, NULL, 0);
}
if ( is_disk_op )
DBG_WARNING("Cleaning up brl and lock database after unclean "
"shutdown\n");
- message_send_all(msg, MSG_SMB_UNLOCK, NULL, 0, NULL);
+ message_send_all(msg, MSG_SMB_UNLOCK, NULL, 0);
brl_revalidate(msg, private_data, msg_type, server_id, data);
}
message_send_all(msg_ctx,
MSG_SMB_STAT_CACHE_DELETE,
name,
- strlen(name)+1,
- NULL);
+ strlen(name)+1);
#endif
}
const void *buf, int len)
{
bool ret;
- int n_sent = 0;
if (procid_to_pid(&pid) != 0)
return NT_STATUS_IS_OK(
messaging_send_buf(msg_ctx, pid, msg_type,
(const uint8_t *)buf, len));
- ret = message_send_all(msg_ctx, msg_type, buf, len, &n_sent);
- DEBUG(10,("smbcontrol/send_message: broadcast message to "
- "%d processes\n", n_sent));
+ ret = message_send_all(msg_ctx, msg_type, buf, len);
return ret;
}