--- scheduler/subscriptions.c.orig 2008-11-20 02:57:17.000000000 +0300 +++ scheduler/subscriptions.c 2008-11-20 03:02:06.000000000 +0300 @@ -728,6 +728,13 @@ { sub = cupsdAddSubscription(CUPSD_EVENT_NONE, NULL, NULL, NULL, atoi(value)); + if (!sub) + { + cupsdLogMessage(CUPSD_LOG_ERROR, + "Unable to add new subscription. Was parsing line %d of subscriptions.conf.", + linenum); + break; + } } else { --- scheduler/ipp.c.orig 2008-11-20 02:55:59.000000000 +0300 +++ scheduler/ipp.c 2008-11-20 02:56:03.000000000 +0300 @@ -2121,6 +2121,14 @@ sub = cupsdAddSubscription(mask, cupsdFindDest(job->dest), job, recipient, 0); + if (!sub) + { + cupsdLogMessage(CUPSD_LOG_ERROR, + "Failed to create subscription for job %d", job->id); + send_ipp_status(con, IPP_TOO_MANY_SUBSCRIPTIONS, + _("Unable to add new subscription")); + return; + } sub->interval = interval; @@ -5591,6 +5599,14 @@ job = NULL; sub = cupsdAddSubscription(mask, printer, job, recipient, 0); + if (!sub) + { + cupsdLogMessage(CUPSD_LOG_ERROR, + "Failed to create subscription for job %d", job->id); + send_ipp_status(con, IPP_TOO_MANY_SUBSCRIPTIONS, + _("Unable to add new subscription")); + return; + } if (job) cupsdLogMessage(CUPSD_LOG_DEBUG, "Added subscription %d for job %d",