/*
- * "$Id: ipp.c,v 1.36 1999/12/07 18:10:18 mike Exp $"
+ * "$Id: ipp.c,v 1.37 1999/12/14 20:41:27 mike Exp $"
*
* IPP routines for the Common UNIX Printing System (CUPS) scheduler.
*
SetPrinterAttrs(printer);
SaveAllPrinters();
+
+ if (printer->job != NULL)
+ {
+ /*
+ * Stop the current job and then restart it below...
+ */
+
+ StopJob(((job_t *)printer->job)->id);
+ }
+
CheckJobs();
LogMessage(LOG_INFO, "New printer \'%s\' added by \'%s\'.", printer->name,
/*
- * End of "$Id: ipp.c,v 1.36 1999/12/07 18:10:18 mike Exp $".
+ * End of "$Id: ipp.c,v 1.37 1999/12/14 20:41:27 mike Exp $".
*/
/*
- * "$Id: job.c,v 1.41 1999/10/12 18:29:30 mike Exp $"
+ * "$Id: job.c,v 1.42 1999/12/14 20:41:28 mike Exp $"
*
* Job management routines for the Common UNIX Printing System (CUPS).
*
if (current->status)
SetPrinterState(current->printer, IPP_PRINTER_STOPPED);
- else
+ else if (current->printer->state == IPP_PRINTER_BUSY)
SetPrinterState(current->printer, IPP_PRINTER_IDLE);
- current->state = IPP_JOB_STOPPED;
- current->printer->job = NULL;
- current->printer = NULL;
+ current->state = IPP_JOB_STOPPED;
+ current->printer->job = NULL;
+ current->printer = NULL;
for (i = 0; current->procs[i]; i ++)
if (current->procs[i] > 0)
+ {
kill(current->procs[i], SIGTERM);
- current->procs[0] = 0;
+ current->procs[i] = 0;
+ }
if (current->pipe)
{
/*
- * End of "$Id: job.c,v 1.41 1999/10/12 18:29:30 mike Exp $".
+ * End of "$Id: job.c,v 1.42 1999/12/14 20:41:28 mike Exp $".
*/