/*
- * "$Id$"
- *
* Subscription routines for the CUPS scheduler.
*
- * Copyright 2007-2014 by Apple Inc.
+ * Copyright 2007-2019 by Apple Inc.
* Copyright 1997-2007 by Easy Software Products, all rights reserved.
*
- * These coded instructions, statements, and computer programs are the
- * property of Apple Inc. and are protected by Federal copyright
- * law. Distribution and use rights are outlined in the file "LICENSE.txt"
- * which should have been included with this file. If this file is
- * file is missing or damaged, see the license at "http://www.cups.org/".
+ * Licensed under Apache License v2.0. See the file "LICENSE" for more information.
*/
/*
* Check if this subscription requires this event...
*/
- if ((sub->mask & event) != 0 &&
- (sub->dest == dest || !sub->dest) &&
- (sub->job == job || !sub->job))
+ if ((sub->mask & event) != 0 && (sub->dest == dest || !sub->dest || sub->job == job))
{
/*
* Need this event, so create a new event record...
time_t curtime; /* Current time */
+ if (cupsArrayCount(Subscriptions) == 0)
+ return;
+
curtime = time(NULL);
update = 0;
+ cupsdLogMessage(CUPSD_LOG_INFO, "Expiring subscriptions...");
+
for (sub = (cupsd_subscription_t *)cupsArrayFirst(Subscriptions);
sub;
sub = (cupsd_subscription_t *)cupsArrayNext(Subscriptions))
break;
}
}
-
-
-/*
- * End of "$Id$".
- */