1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-23 17:34:34 +03:00

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.
This commit is contained in:
Volker Lendecke 2008-12-30 14:05:26 +01:00
parent ff50a88331
commit b3abd484db

View File

@ -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),