From b3abd484dbd7673120f7a7a9613789dc7aeb9341 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Tue, 30 Dec 2008 14:05:26 +0100 Subject: Fix a spinning smbd when printing Without this, we end up adding more than one timed event. In the event handler print_notify_event_send_messages() only one event will be deleted, all others will fire indefinitely. --- source3/printing/notify.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3/printing/notify.c') diff --git a/source3/printing/notify.c b/source3/printing/notify.c index f6599c413d..b24a8a52f5 100644 --- a/source3/printing/notify.c +++ b/source3/printing/notify.c @@ -322,7 +322,7 @@ to notify_queue_head\n", msg->type, msg->field, msg->printer)); DLIST_ADD_END(notify_queue_head, pnqueue, struct notify_queue *); num_messages++; - if (smbd_event_context()) { + if ((notify_event == NULL) && (smbd_event_context() != NULL)) { /* Add an event for 1 second's time to send this queue. */ notify_event = event_add_timed(smbd_event_context(), NULL, timeval_current_ofs(1,0), -- cgit