]> git.ipfire.org Git - thirdparty/cups.git/blobdiff - notifier/dbus.c
Merge changes from CUPS 1.5svn-r9049 (private header support)
[thirdparty/cups.git] / notifier / dbus.c
index 1f1c43a21420c8c08279f7c7cf57a78b1465237b..62a6aaffc5538d380473d3f369e0aeae5c7cabdb 100644 (file)
@@ -1,9 +1,9 @@
 /*
  * "$Id$"
  *
- *   D-Bus notifier for the Common UNIX Printing System (CUPS).
+ *   D-Bus notifier for CUPS.
  *
- *   Copyright 2008 by Apple Inc.
+ *   Copyright 2008-2010 by Apple Inc.
  *   Copyright (C) 2007 Red Hat, Inc.
  *   Copyright (C) 2007 Tim Waugh <twaugh@redhat.com>
  *   Copyright 1997-2005 by Easy Software Products.
@@ -16,6 +16,8 @@
  *
  * Contents:
  *
+ *   main()         - Read events and send DBUS notifications.
+ *   acquire_lock() - Acquire a lock so we only have a single notifier running.
  */
 
 /*
@@ -23,7 +25,7 @@
  */
 
 #include <cups/cups.h>
-#include <cups/string.h>
+#include <cups/string-private.h>
 #include <fcntl.h>
 #include <signal.h>
 #include <sys/stat.h>
@@ -154,7 +156,7 @@ enum
  * Local functions...
  */
 
-static int     acquire_lock(int *fd);
+static int     acquire_lock(int *fd, char *lockfile, size_t locksize);
 
 
 /*
@@ -201,7 +203,7 @@ main(int  argc,                             /* I - Number of command-line args */
     return (1);
   }
 
-  if (strcmp(argv[1], "dbus:"))
+  if (strncmp(argv[1], "dbus:", 5))
   {
     fprintf(stderr, "ERROR: Bad URI \"%s\"!\n", argv[1]);
     return (1);