summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2008-12-30 14:05:26 +0100
committerVolker Lendecke <vl@samba.org>2008-12-30 14:14:06 +0100
commitb3abd484dbd7673120f7a7a9613789dc7aeb9341 (patch)
tree85c6fc842b94a40ac74bdc82f802648827a63859
parentff50a88331e95bcb03e7d60a2e1eaded516f309f (diff)
downloadsamba-b3abd484dbd7673120f7a7a9613789dc7aeb9341.tar.gz
samba-b3abd484dbd7673120f7a7a9613789dc7aeb9341.tar.xz
samba-b3abd484dbd7673120f7a7a9613789dc7aeb9341.zip
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.
-rw-r--r--source3/printing/notify.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source3/printing/notify.c b/source3/printing/notify.c
index f6599c413d0..b24a8a52f59 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),