From: Volker Lendecke Date: Tue, 30 Dec 2008 13:05:26 +0000 (+0100) Subject: Fix a spinning smbd when printing X-Git-Tag: samba-3.3.0~119 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7125c95bf1f7a822f2873938bcdde4be5acdd59c;p=thirdparty%2Fsamba.git 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. (cherry picked from commit dec9368e7458048b783bb2f967f578d5e094d805) --- diff --git a/source/printing/notify.c b/source/printing/notify.c index f6599c413d0..b24a8a52f59 100644 --- a/source/printing/notify.c +++ b/source/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),