/*
- * "$Id: server.c 4830 2005-11-12 03:27:16Z mike $"
+ * "$Id: server.c 5095 2006-02-09 16:22:48Z mike $"
*
* Server start/stop routines for the Common UNIX Printing System (CUPS).
*
- * Copyright 1997-2005 by Easy Software Products, all rights reserved.
+ * Copyright 1997-2006 by Easy Software Products, all rights reserved.
*
* These coded instructions, statements, and computer programs are the
* property of Easy Software Products and are protected by Federal
#include <cups/http-private.h>
#include "cupsd.h"
#include <grp.h>
+#ifdef HAVE_NOTIFY_H
+# include <notify.h>
+#endif /* HAVE_NOTIFY_H */
/*
FD_SET(CGIPipes[0], InputSet);
}
+ /*
+ * Mark that the server has started and printers and jobs may be changed...
+ */
+
+ LastEvent = CUPSD_EVENT_PRINTER_CHANGED | CUPSD_EVENT_JOB_STATE_CHANGED |
+ CUPSD_EVENT_SERVER_STARTED;
+ LastEventTime = 0;
+
started = 1;
}
PageFile = NULL;
}
+#ifdef HAVE_NOTIFY_POST
+ /*
+ * Send one last notification as the server shuts down.
+ */
+
+ cupsdLogMessage(CUPSD_LOG_DEBUG,
+ "notify_post(\"com.apple.printerListChange\") last");
+ notify_post("com.apple.printerListChange");
+#endif /* HAVE_NOTIFY_POST */
+
started = 0;
}
/*
- * End of "$Id: server.c 4830 2005-11-12 03:27:16Z mike $".
+ * End of "$Id: server.c 5095 2006-02-09 16:22:48Z mike $".
*/