summaryrefslogtreecommitdiff
path: root/source3/printing/printing.c
diff options
context:
space:
mode:
authorVolker Lendecke <vlendec@samba.org>2007-05-16 20:56:39 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:22:11 -0500
commite95942ed84fef4dd34c380d59145d3e182b01702 (patch)
tree8708f2aaf5d7c0c39bd56d93cf28a412b151b65c /source3/printing/printing.c
parent9b48f7d76d1700f3be951b0322a7184bd192004f (diff)
downloadsamba-e95942ed84fef4dd34c380d59145d3e182b01702.tar.gz
samba-e95942ed84fef4dd34c380d59145d3e182b01702.tar.bz2
samba-e95942ed84fef4dd34c380d59145d3e182b01702.zip
r22954: More messaging_register
(This used to be commit 9b8df24107ffe3016031e5257c5680689f061886)
Diffstat (limited to 'source3/printing/printing.c')
-rw-r--r--source3/printing/printing.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/source3/printing/printing.c b/source3/printing/printing.c
index 9bae768c19..6717f473cc 100644
--- a/source3/printing/printing.c
+++ b/source3/printing/printing.c
@@ -178,7 +178,7 @@ static int get_queue_status(const char* sharename, print_status_struct *);
Initialise the printing backend. Called once at startup before the fork().
****************************************************************************/
-BOOL print_backend_init(void)
+BOOL print_backend_init(struct messaging_context *msg_ctx)
{
const char *sversion = "INFO/version";
pstring printing_path;
@@ -215,7 +215,7 @@ BOOL print_backend_init(void)
close_all_print_db(); /* Don't leave any open. */
/* do NT print initialization... */
- return nt_printing_init();
+ return nt_printing_init(msg_ctx);
}
/****************************************************************************
@@ -1348,16 +1348,18 @@ 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 server_id src,
- void *buf, size_t msglen,
- void *private_data)
+static void print_queue_receive(struct messaging_context *msg,
+ void *private_data,
+ uint32_t msg_type,
+ struct server_id server_id,
+ DATA_BLOB *data)
{
fstring sharename;
pstring lpqcommand, lprmcommand;
int printing_type;
size_t len;
- len = tdb_unpack( (uint8 *)buf, msglen, "fdPP",
+ len = tdb_unpack( (uint8 *)data->data, data->length, "fdPP",
sharename,
&printing_type,
lpqcommand,
@@ -1401,8 +1403,8 @@ void start_background_queue(void)
exit(1);
}
- message_register(MSG_PRINTER_UPDATE, print_queue_receive,
- NULL);
+ messaging_register(smbd_messaging_context(), NULL,
+ MSG_PRINTER_UPDATE, print_queue_receive);
DEBUG(5,("start_background_queue: background LPQ thread waiting for messages\n"));
while (1) {