]> git.ipfire.org Git - thirdparty/cups.git/blobdiff - scheduler/subscriptions.c
Update svn:keyword properties.
[thirdparty/cups.git] / scheduler / subscriptions.c
index b2ad51e8f0b7e7a7c591e164e3afa73120ee9e71..2e9eee3770b5115a387d7529e737d5041d72cd7f 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: subscriptions.c 7824 2008-08-01 21:11:55Z mike $"
+ * "$Id$"
  *
  *   Subscription routines for the CUPS scheduler.
  *
@@ -146,7 +146,11 @@ cupsdAddEvent(
       temp->time  = time(NULL);
       temp->attrs = ippNew();
       temp->job   = job;
-      temp->dest  = dest;
+
+      if (dest)
+        temp->dest = dest;
+      else if (job)
+        temp->dest = dest = cupsdFindPrinter(job->dest);
 
      /*
       * Add common event notification attributes...
@@ -748,7 +752,7 @@ cupsdLoadAllSubscriptions(void)
 
   while (cupsFileGetConf(fp, line, sizeof(line), &value, &linenum))
   {
-    if (!strcasecmp(line, "NextSubscriptionId") && value)
+    if (!_cups_strcasecmp(line, "NextSubscriptionId") && value)
     {
      /*
       * NextSubscriptionId NNN
@@ -758,7 +762,7 @@ cupsdLoadAllSubscriptions(void)
       if (i >= NextSubscriptionId && i > 0)
         NextSubscriptionId = i;
     }
-    else if (!strcasecmp(line, "<Subscription"))
+    else if (!_cups_strcasecmp(line, "<Subscription"))
     {
      /*
       * <Subscription #>
@@ -777,7 +781,7 @@ cupsdLoadAllSubscriptions(void)
         break;
       }
     }
-    else if (!strcasecmp(line, "</Subscription>"))
+    else if (!_cups_strcasecmp(line, "</Subscription>"))
     {
       if (!sub)
       {
@@ -799,7 +803,7 @@ cupsdLoadAllSubscriptions(void)
                       "Syntax error on line %d of subscriptions.conf.",
                      linenum);
     }
-    else if (!strcasecmp(line, "Events"))
+    else if (!_cups_strcasecmp(line, "Events"))
     {
      /*
       * Events name
@@ -840,7 +844,7 @@ cupsdLoadAllSubscriptions(void)
        value = valueptr;
       }
     }
-    else if (!strcasecmp(line, "Owner"))
+    else if (!_cups_strcasecmp(line, "Owner"))
     {
      /*
       * Owner
@@ -856,7 +860,7 @@ cupsdLoadAllSubscriptions(void)
        break;
       }
     }
-    else if (!strcasecmp(line, "Recipient"))
+    else if (!_cups_strcasecmp(line, "Recipient"))
     {
      /*
       * Recipient uri
@@ -872,7 +876,7 @@ cupsdLoadAllSubscriptions(void)
        break;
       }
     }
-    else if (!strcasecmp(line, "JobId"))
+    else if (!_cups_strcasecmp(line, "JobId"))
     {
      /*
       * JobId #
@@ -896,7 +900,7 @@ cupsdLoadAllSubscriptions(void)
        break;
       }
     }
-    else if (!strcasecmp(line, "PrinterName"))
+    else if (!_cups_strcasecmp(line, "PrinterName"))
     {
      /*
       * PrinterName name
@@ -920,7 +924,7 @@ cupsdLoadAllSubscriptions(void)
        break;
       }
     }
-    else if (!strcasecmp(line, "UserData"))
+    else if (!_cups_strcasecmp(line, "UserData"))
     {
      /*
       * UserData encoded-string
@@ -982,7 +986,7 @@ cupsdLoadAllSubscriptions(void)
        break;
       }
     }
-    else if (!strcasecmp(line, "LeaseDuration"))
+    else if (!_cups_strcasecmp(line, "LeaseDuration"))
     {
      /*
       * LeaseDuration #
@@ -1001,7 +1005,7 @@ cupsdLoadAllSubscriptions(void)
        break;
       }
     }
-    else if (!strcasecmp(line, "Interval"))
+    else if (!_cups_strcasecmp(line, "Interval"))
     {
      /*
       * Interval #
@@ -1017,7 +1021,7 @@ cupsdLoadAllSubscriptions(void)
        break;
       }
     }
-    else if (!strcasecmp(line, "ExpirationTime"))
+    else if (!_cups_strcasecmp(line, "ExpirationTime"))
     {
      /*
       * ExpirationTime #
@@ -1033,7 +1037,7 @@ cupsdLoadAllSubscriptions(void)
        break;
       }
     }
-    else if (!strcasecmp(line, "NextEventId"))
+    else if (!_cups_strcasecmp(line, "NextEventId"))
     {
      /*
       * NextEventId #
@@ -1634,5 +1638,5 @@ cupsd_update_notifier(void)
 
 
 /*
- * End of "$Id: subscriptions.c 7824 2008-08-01 21:11:55Z mike $".
+ * End of "$Id$".
  */