From 4d5f58c2b945e7a2263ba42749f73c7ba72ab3c7 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Sat, 19 May 2007 21:53:28 +0000 Subject: r23015: Make message_(de)register static to messages.c (This used to be commit a8082a3c7c3d1e68c27fc3bf42f3d44402cc6f9f) --- source3/rpc_server/srv_spoolss_nt.c | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) (limited to 'source3/rpc_server') diff --git a/source3/rpc_server/srv_spoolss_nt.c b/source3/rpc_server/srv_spoolss_nt.c index 49782dca43..890d2e0885 100644 --- a/source3/rpc_server/srv_spoolss_nt.c +++ b/source3/rpc_server/srv_spoolss_nt.c @@ -166,7 +166,8 @@ static void srv_spoolss_replycloseprinter(int snum, POLICY_HND *handle) cli_shutdown( notify_cli_pipe->cli ); notify_cli_pipe = NULL; /* The above call shuts downn the pipe also. */ - message_deregister(MSG_PRINTER_NOTIFY2); + messaging_deregister(smbd_messaging_context(), + MSG_PRINTER_NOTIFY2, NULL); /* Tell the connections db we're no longer interested in * printer notify messages. */ @@ -1110,19 +1111,21 @@ static BOOL notify2_unpack_msg( SPOOLSS_NOTIFY_MSG *msg, struct timeval *tv, voi Receive a notify2 message list ********************************************************************/ -static void receive_notify2_message_list(int msg_type, struct server_id src, - void *msg, size_t len, - void *private_data) +static void receive_notify2_message_list(struct messaging_context *msg, + void *private_data, + uint32_t msg_type, + struct server_id server_id, + DATA_BLOB *data) { size_t msg_count, i; - char *buf = (char *)msg; + char *buf = (char *)data->data; char *msg_ptr; size_t msg_len; SPOOLSS_NOTIFY_MSG notify; SPOOLSS_NOTIFY_MSG_CTR messages; int num_groups; - if (len < 4) { + if (data->length < 4) { DEBUG(0,("receive_notify2_message_list: bad message format (len < 4)!\n")); return; } @@ -1152,7 +1155,7 @@ static void receive_notify2_message_list(int msg_type, struct server_id src, for ( i=0; i len) { + if (msg_ptr + 4 - buf > data->length) { DEBUG(0,("receive_notify2_message_list: bad message format (len > buf_size) !\n")); return; } @@ -1160,7 +1163,7 @@ static void receive_notify2_message_list(int msg_type, struct server_id src, msg_len = IVAL(msg_ptr,0); msg_ptr += 4; - if (msg_ptr + msg_len - buf > len) { + if (msg_ptr + msg_len - buf > data->length) { DEBUG(0,("receive_notify2_message_list: bad message format (bad len) !\n")); return; } @@ -2616,8 +2619,9 @@ static BOOL srv_spoolss_replyopenprinter(int snum, const char *printer, if ( !spoolss_connect_to_client( ¬ify_cli_pipe, client_ip, unix_printer )) return False; - message_register(MSG_PRINTER_NOTIFY2, - receive_notify2_message_list, NULL); + messaging_register(smbd_messaging_context(), NULL, + MSG_PRINTER_NOTIFY2, + receive_notify2_message_list); /* Tell the connections db we're now interested in printer * notify messages. */ register_message_flags( True, FLAG_MSG_PRINT_NOTIFY ); -- cgit