mirror of
https://github.com/samba-team/samba.git
synced 2025-11-29 16:23:52 +03:00
r21064: The core of this patch is
void message_register(int msg_type,
void (*fn)(int msg_type, struct process_id pid,
- void *buf, size_t len))
+ void *buf, size_t len,
+ void *private_data),
+ void *private_data)
{
struct dispatch_fns *dfn;
So this adds a (so far unused) private pointer that is passed from
message_register to the message handler. A prerequisite to implement a tiny
samba4-API compatible wrapper around our messaging system. That itself is
necessary for the Samba4 notify system.
Yes, I know, I could import the whole Samba4 messaging system, but I want to
do it step by step and I think getting notify in is more important in this
step.
Volker
This commit is contained in:
committed by
Gerald (Jerry) Carter
parent
7e17e54cb7
commit
c8ae60ed65
@@ -1107,7 +1107,8 @@ static BOOL notify2_unpack_msg( SPOOLSS_NOTIFY_MSG *msg, struct timeval *tv, voi
|
||||
********************************************************************/
|
||||
|
||||
static void receive_notify2_message_list(int msg_type, struct process_id src,
|
||||
void *msg, size_t len)
|
||||
void *msg, size_t len,
|
||||
void *private_data)
|
||||
{
|
||||
size_t msg_count, i;
|
||||
char *buf = (char *)msg;
|
||||
@@ -1219,7 +1220,8 @@ static BOOL srv_spoolss_drv_upgrade_printer(char* drivername)
|
||||
over all printers, upgrading ones as necessary
|
||||
**********************************************************************/
|
||||
|
||||
void do_drv_upgrade_printer(int msg_type, struct process_id src, void *buf, size_t len)
|
||||
void do_drv_upgrade_printer(int msg_type, struct process_id src,
|
||||
void *buf, size_t len, void *private_data)
|
||||
{
|
||||
fstring drivername;
|
||||
int snum;
|
||||
@@ -1317,7 +1319,7 @@ static BOOL srv_spoolss_reset_printerdata(char* drivername)
|
||||
**********************************************************************/
|
||||
|
||||
void reset_all_printerdata(int msg_type, struct process_id src,
|
||||
void *buf, size_t len)
|
||||
void *buf, size_t len, void *private_data)
|
||||
{
|
||||
fstring drivername;
|
||||
int snum;
|
||||
@@ -2597,7 +2599,8 @@ 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);
|
||||
message_register(MSG_PRINTER_NOTIFY2,
|
||||
receive_notify2_message_list, NULL);
|
||||
/* Tell the connections db we're now interested in printer
|
||||
* notify messages. */
|
||||
register_message_flags( True, FLAG_MSG_PRINT_NOTIFY );
|
||||
|
||||
Reference in New Issue
Block a user