}
-static void id_cache_flush(struct messaging_context *msg_ctx,
- void* private_data,
- uint32_t msg_type,
- struct server_id server_id,
- DATA_BLOB* data)
+void id_cache_flush_message(struct messaging_context *msg_ctx,
+ void* private_data,
+ uint32_t msg_type,
+ struct server_id server_id,
+ DATA_BLOB* data)
{
const char *msg = data ? (const char *)data->data : NULL;
}
}
-static void id_cache_delete(struct messaging_context *msg_ctx,
- void *private_data,
- uint32_t msg_type,
- struct server_id server_id,
- DATA_BLOB* data)
+void id_cache_delete_message(struct messaging_context *msg_ctx,
+ void *private_data,
+ uint32_t msg_type,
+ struct server_id server_id,
+ DATA_BLOB* data)
{
const char *msg = (data && data->data) ? (const char *)data->data : "<NULL>";
struct id_cache_ref id;
void id_cache_register_msgs(struct messaging_context *ctx)
{
- messaging_register(ctx, NULL, ID_CACHE_FLUSH, id_cache_flush);
- messaging_register(ctx, NULL, ID_CACHE_DELETE, id_cache_delete);
+ messaging_register(ctx, NULL, ID_CACHE_FLUSH, id_cache_flush_message);
+ messaging_register(ctx, NULL, ID_CACHE_DELETE, id_cache_delete_message);
}
void id_cache_delete_from_cache(const struct id_cache_ref* id);
void id_cache_register_msgs(struct messaging_context *ctx);
+
+void id_cache_delete_message(struct messaging_context *msg_ctx,
+ void *private_data,
+ uint32_t msg_type,
+ struct server_id server_id,
+ DATA_BLOB* data);
+
+void id_cache_flush_message(struct messaging_context *msg_ctx,
+ void* private_data,
+ uint32_t msg_type,
+ struct server_id server_id,
+ DATA_BLOB* data);
return;
}
+ if (am_parent) {
+ messaging_send_to_children(msg_ctx, msg_type, data);
+ }
+
if (id_in_use(validated_users, &id)) {
exit_server_cleanly(msg);
}
id_cache_delete_from_cache(&id);
}
-void id_cache_register_kill_msg(struct messaging_context *ctx)
+static void id_cache_flush(struct messaging_context *ctx,
+ void* data,
+ uint32_t msg_type,
+ struct server_id srv_id,
+ DATA_BLOB* msg_data)
+{
+ id_cache_flush_message(ctx, data, msg_type, srv_id, msg_data);
+
+ if (am_parent) {
+ messaging_send_to_children(ctx, msg_type, msg_data);
+ }
+}
+
+static void id_cache_delete(struct messaging_context *ctx,
+ void* data,
+ uint32_t msg_type,
+ struct server_id srv_id,
+ DATA_BLOB* msg_data)
+{
+ id_cache_delete_message(ctx, data, msg_type, srv_id, msg_data);
+
+ if (am_parent) {
+ messaging_send_to_children(ctx, msg_type, msg_data);
+ }
+}
+
+
+void msg_idmap_register_msg(struct messaging_context *ctx)
{
+ messaging_register(ctx, NULL, ID_CACHE_FLUSH, id_cache_flush);
+ messaging_register(ctx, NULL, ID_CACHE_DELETE, id_cache_delete);
messaging_register(ctx, NULL, ID_CACHE_KILL, id_cache_kill);
}
/* The following definitions come from smbd/msg_idmap.c */
-void id_cache_register_kill_msg(struct messaging_context *ctx);
+void msg_idmap_register_msg(struct messaging_context *ctx);
#endif /* _SMBD_PROTO_H_ */
smb_pcap_updated);
brl_register_msgs(msg_ctx);
- id_cache_register_msgs(msg_ctx);
- id_cache_register_kill_msg(msg_ctx);
+ msg_idmap_register_msg(msg_ctx);
#ifdef CLUSTER_SUPPORT
if (lp_clustering()) {