]> git.ipfire.org Git - thirdparty/cups.git/blobdiff - scheduler/quotas.c
Load cups into easysw/current.
[thirdparty/cups.git] / scheduler / quotas.c
index a51f7f08dc0ee4a8df85cc55d0e0925e016c9b7f..e224ebe3a8d97cd93e4db6cec047975c18a06191 100644 (file)
@@ -1,9 +1,9 @@
 /*
- * "$Id: quotas.c 5969 2006-09-19 20:09:24Z mike $"
+ * "$Id: quotas.c 6365 2007-03-19 20:56:57Z mike $"
  *
  *   Quota routines for the Common UNIX Printing System (CUPS).
  *
- *   Copyright 1997-2006 by Easy Software Products.
+ *   Copyright 1997-2007 by Easy Software Products.
  *
  *   These coded instructions, statements, and computer programs are the
  *   property of Easy Software Products and are protected by Federal
@@ -101,6 +101,19 @@ cupsdUpdateQuota(
                   "cupsdUpdateQuota: p=%s username=%s pages=%d k=%d",
                   p->name, username, pages, k);
 
+#if defined(__APPLE__) && defined(HAVE_DLFCN_H)
+ /*
+  * Use Apple PrintService quota enforcement if installed (X Server only)
+  */
+
+  if (AppleQuotas && PSQUpdateQuotaProc)
+  { 
+    q->page_count = (*PSQUpdateQuotaProc)(p->name, p->info, username, pages, 0);
+
+    return (q);
+  }
+#endif /* __APPLE__ && HAVE_DLFCN_H */
+
   curtime = time(NULL);
 
   if (curtime < q->next_update)
@@ -230,5 +243,5 @@ find_quota(cupsd_printer_t *p,              /* I - Printer */
 
 
 /*
- * End of "$Id: quotas.c 5969 2006-09-19 20:09:24Z mike $".
+ * End of "$Id: quotas.c 6365 2007-03-19 20:56:57Z mike $".
  */