Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No server-started/restarted/stopped events #2927

Closed
michaelrsweet opened this issue Sep 5, 2008 · 3 comments
Closed

No server-started/restarted/stopped events #2927

michaelrsweet opened this issue Sep 5, 2008 · 3 comments
Milestone

Comments

@michaelrsweet
Copy link
Collaborator

Version: 1.3-current
CUPS.org User: twaugh.redhat

When using IPP notifications I found that server start/stop events are not reported. It would be quite useful to have these.

@michaelrsweet
Copy link
Collaborator Author

CUPS.org User: mike

Moving to CUPS 1.3.x as a priority-2 bug...

@michaelrsweet
Copy link
Collaborator Author

CUPS.org User: mike

Fixed in Subversion repository.

@michaelrsweet
Copy link
Collaborator Author

"str2927.patch":

Index: scheduler/main.c

--- scheduler/main.c (revision 7911)
+++ scheduler/main.c (working copy)
@@ -655,6 +655,23 @@
#endif /* APPLE */

/*

  • * Send server-started event...
  • */

+#ifdef HAVE_LAUNCHD

  • if (Launchd)
  • cupsdAddEvent(CUPSD_EVENT_SERVER_STARTED, NULL, NULL,
  •              "Scheduler started via launchd.");
    
  • else
    +#endif /* HAVE_LAUNCHD */
  • if (fg)
  • cupsdAddEvent(CUPSD_EVENT_SERVER_STARTED, NULL, NULL,
  •              "Scheduler started in foreground.");
    
  • else
  • cupsdAddEvent(CUPSD_EVENT_SERVER_STARTED, NULL, NULL,
  •              "Scheduler started in background.");
    
  • /*
    • Start any pending print jobs...
      */

@@ -762,6 +779,13 @@
*/

     cupsdStartServer();
  •   /*
    
  •    \* Send a server-restarted event...
    
  • */
  •    cupsdAddEvent(CUPSD_EVENT_SERVER_RESTARTED, NULL, NULL,
    
  •                  "Scheduler restarted.");
    
    }
    }

@@ -1101,10 +1125,18 @@
*/

if (stop_scheduler)

  • {
    cupsdLogMessage(CUPSD_LOG_INFO, "Scheduler shutting down normally.");
  • cupsdAddEvent(CUPSD_EVENT_SERVER_STOPPED, NULL, NULL,
  •              "Scheduler shutting down normally.");
    
  • }
    else
  • {
    cupsdLogMessage(CUPSD_LOG_ERROR,
    "Scheduler shutting down due to program error.");
  • cupsdAddEvent(CUPSD_EVENT_SERVER_STOPPED, NULL, NULL,
  •              "Scheduler shutting down due to program error.");
    
  • }

/*

  • Close all network clients...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant