From: Volker Lendecke Date: Sun, 5 Nov 2017 11:54:10 +0000 (+0100) Subject: lib: Use messaging_send_all instead of message_send_all X-Git-Tag: talloc-2.1.11~292 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=6423ca4bf293cac5e2f84b1a37bb29b06b5c05ed;p=thirdparty%2Fsamba.git lib: Use messaging_send_all instead of message_send_all Just a global search&replace Signed-off-by: Volker Lendecke Reviewed-by: Jeremy Allison --- diff --git a/source3/passdb/pdb_interface.c b/source3/passdb/pdb_interface.c index 9827046187e..7fdc33c4fa7 100644 --- a/source3/passdb/pdb_interface.c +++ b/source3/passdb/pdb_interface.c @@ -648,10 +648,10 @@ NTSTATUS pdb_delete_user(TALLOC_CTX *mem_ctx, struct samu *sam_acct) * just return */ return status; } - message_send_all(server_messaging_context(), - ID_CACHE_DELETE, - msg_data, - strlen(msg_data) + 1); + messaging_send_all(server_messaging_context(), + ID_CACHE_DELETE, + msg_data, + strlen(msg_data) + 1); TALLOC_FREE(msg_data); return status; diff --git a/source3/printing/queue_process.c b/source3/printing/queue_process.c index 381ef348805..7a3b80aae0c 100644 --- a/source3/printing/queue_process.c +++ b/source3/printing/queue_process.c @@ -144,7 +144,7 @@ static void reload_pcap_change_notify(struct tevent_context *ev, */ delete_and_reload_printers_full(ev, msg_ctx); - message_send_all(msg_ctx, MSG_PRINTER_PCAP, NULL, 0); + messaging_send_all(msg_ctx, MSG_PRINTER_PCAP, NULL, 0); } struct bq_state { diff --git a/source3/rpc_server/fss/srv_fss_agent.c b/source3/rpc_server/fss/srv_fss_agent.c index c0bf7ddd11a..0e5c82ec5e9 100644 --- a/source3/rpc_server/fss/srv_fss_agent.c +++ b/source3/rpc_server/fss/srv_fss_agent.c @@ -1235,7 +1235,7 @@ uint32_t _fss_ExposeShadowCopySet(struct pipes_struct *p, } unbecome_root(); - message_send_all(p->msg_ctx, MSG_SMB_CONF_UPDATED, NULL, 0); + messaging_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) @@ -1577,7 +1577,7 @@ static NTSTATUS sc_smap_unexpose(struct messaging_context *msg_ctx, ret = NT_STATUS_UNSUCCESSFUL; goto err_cancel; } - message_send_all(msg_ctx, MSG_SMB_CONF_UPDATED, NULL, 0); + messaging_send_all(msg_ctx, MSG_SMB_CONF_UPDATED, NULL, 0); } else { ret = NT_STATUS_OK; goto err_cancel; @@ -1660,8 +1660,9 @@ uint32_t _fss_DeleteShareMapping(struct pipes_struct *p, goto err_tmp_free; } - message_send_all(p->msg_ctx, MSG_SMB_FORCE_TDIS, sc_smap->sc_share_name, - strlen(sc_smap->sc_share_name) + 1); + messaging_send_all(p->msg_ctx, MSG_SMB_FORCE_TDIS, + sc_smap->sc_share_name, + strlen(sc_smap->sc_share_name) + 1); if (sc->smaps_count > 1) { /* do not delete the underlying snapshot - still in use */ diff --git a/source3/rpc_server/spoolss/srv_spoolss_nt.c b/source3/rpc_server/spoolss/srv_spoolss_nt.c index d8b6023e5e9..f0226ba9441 100644 --- a/source3/rpc_server/spoolss/srv_spoolss_nt.c +++ b/source3/rpc_server/spoolss/srv_spoolss_nt.c @@ -368,7 +368,7 @@ static WERROR delete_printer_hook(TALLOC_CTX *ctx, struct security_token *token, 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); + messaging_send_all(msg_ctx, MSG_SMB_CONF_UPDATED, NULL, 0); } if ( is_print_op ) @@ -6433,7 +6433,7 @@ static bool add_printer_hook(TALLOC_CTX *ctx, struct security_token *token, 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); + messaging_send_all(msg_ctx, MSG_SMB_CONF_UPDATED, NULL, 0); } if ( is_print_op ) diff --git a/source3/rpc_server/srvsvc/srv_srvsvc_nt.c b/source3/rpc_server/srvsvc/srv_srvsvc_nt.c index 899feb22da9..2ff8e64fccc 100644 --- a/source3/rpc_server/srvsvc/srv_srvsvc_nt.c +++ b/source3/rpc_server/srvsvc/srv_srvsvc_nt.c @@ -1908,8 +1908,8 @@ WERROR _srvsvc_NetShareSetInfo(struct pipes_struct *p, 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); + messaging_send_all(p->msg_ctx, MSG_SMB_CONF_UPDATED, + NULL, 0); } if ( is_disk_op ) @@ -2111,7 +2111,7 @@ WERROR _srvsvc_NetShareAdd(struct pipes_struct *p, 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); + messaging_send_all(p->msg_ctx, MSG_SMB_CONF_UPDATED, NULL, 0); } if ( is_disk_op ) @@ -2218,7 +2218,7 @@ WERROR _srvsvc_NetShareDel(struct pipes_struct *p, 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); + messaging_send_all(p->msg_ctx, MSG_SMB_CONF_UPDATED, NULL, 0); } if ( is_disk_op ) diff --git a/source3/smbd/smbd_cleanupd.c b/source3/smbd/smbd_cleanupd.c index 90c12cdcd7c..cfb75c971be 100644 --- a/source3/smbd/smbd_cleanupd.c +++ b/source3/smbd/smbd_cleanupd.c @@ -98,7 +98,7 @@ static void smbd_cleanupd_unlock(struct messaging_context *msg, DBG_WARNING("Cleaning up brl and lock database after unclean " "shutdown\n"); - message_send_all(msg, MSG_SMB_UNLOCK, NULL, 0); + messaging_send_all(msg, MSG_SMB_UNLOCK, NULL, 0); brl_revalidate(msg, private_data, msg_type, server_id, data); } diff --git a/source3/smbd/statcache.c b/source3/smbd/statcache.c index 2023d52fb84..d49f5eebdf0 100644 --- a/source3/smbd/statcache.c +++ b/source3/smbd/statcache.c @@ -354,10 +354,10 @@ void smbd_send_stat_cache_delete_message(struct messaging_context *msg_ctx, const char *name) { #ifdef DEVELOPER - message_send_all(msg_ctx, - MSG_SMB_STAT_CACHE_DELETE, - name, - strlen(name)+1); + messaging_send_all(msg_ctx, + MSG_SMB_STAT_CACHE_DELETE, + name, + strlen(name)+1); #endif } diff --git a/source3/utils/smbcontrol.c b/source3/utils/smbcontrol.c index 417358b7d5b..0f6dacce20d 100644 --- a/source3/utils/smbcontrol.c +++ b/source3/utils/smbcontrol.c @@ -61,16 +61,14 @@ static bool send_message(struct messaging_context *msg_ctx, struct server_id pid, int msg_type, const void *buf, int len) { - bool ret; - 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); + messaging_send_all(msg_ctx, msg_type, buf, len); - return ret; + return true; } static void smbcontrol_timeout(struct tevent_context *event_ctx,