diff options
author | Volker Lendecke <vlendec@samba.org> | 2007-01-30 22:22:06 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 12:17:32 -0500 |
commit | c8ae60ed65dcce9660ee39c75488f2838cf9a28b (patch) | |
tree | 370e036b8de89f67d2d90cb5978870ff22bbe8c8 /source/printing | |
parent | 7e17e54cb729e34c935927fe69a43690c7f446ae (diff) | |
download | samba-c8ae60ed65dcce9660ee39c75488f2838cf9a28b.tar.gz samba-c8ae60ed65dcce9660ee39c75488f2838cf9a28b.tar.xz samba-c8ae60ed65dcce9660ee39c75488f2838cf9a28b.zip |
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
Diffstat (limited to 'source/printing')
-rw-r--r-- | source/printing/nt_printing.c | 5 | ||||
-rw-r--r-- | source/printing/printing.c | 6 |
2 files changed, 7 insertions, 4 deletions
diff --git a/source/printing/nt_printing.c b/source/printing/nt_printing.c index aa9075c7db3..e415cd41b2a 100644 --- a/source/printing/nt_printing.c +++ b/source/printing/nt_printing.c @@ -629,14 +629,15 @@ BOOL nt_printing_init(void) * drivers are installed */ - message_register( MSG_PRINTER_DRVUPGRADE, do_drv_upgrade_printer ); + message_register(MSG_PRINTER_DRVUPGRADE, do_drv_upgrade_printer, NULL); /* * register callback to handle updating printer data * when a driver is initialized */ - message_register( MSG_PRINTERDATA_INIT_RESET, reset_all_printerdata ); + message_register(MSG_PRINTERDATA_INIT_RESET, reset_all_printerdata, + NULL); /* of course, none of the message callbacks matter if you don't tell messages.c that you interested in receiving PRINT_GENERAL diff --git a/source/printing/printing.c b/source/printing/printing.c index 2f1d123a200..588641358f3 100644 --- a/source/printing/printing.c +++ b/source/printing/printing.c @@ -1352,7 +1352,8 @@ static void print_queue_update_with_lock( const char *sharename, this is the receive function of the background lpq updater ****************************************************************************/ static void print_queue_receive(int msg_type, struct process_id src, - void *buf, size_t msglen) + void *buf, size_t msglen, + void *private_data) { fstring sharename; pstring lpqcommand, lprmcommand; @@ -1403,7 +1404,8 @@ void start_background_queue(void) exit(1); } - message_register(MSG_PRINTER_UPDATE, print_queue_receive); + message_register(MSG_PRINTER_UPDATE, print_queue_receive, + NULL); DEBUG(5,("start_background_queue: background LPQ thread waiting for messages\n")); while (1) { |