summaryrefslogtreecommitdiff
path: root/scheduler/main.c
diff options
context:
space:
mode:
authorMichael R Sweet <michael.r.sweet@gmail.com>2018-12-05 12:34:39 -0500
committerMichael R Sweet <michael.r.sweet@gmail.com>2018-12-05 12:34:39 -0500
commit3dee5db7b96baf423c4325e133ef22a0fbe980eb (patch)
tree9a2d761a58075b43f089c059ee68c689f55810b6 /scheduler/main.c
parent8c7143551ab03423990c62923209363d760f925f (diff)
downloadcups-3dee5db7b96baf423c4325e133ef22a0fbe980eb.tar.gz
Revert os_transaction changes.
Diffstat (limited to 'scheduler/main.c')
-rw-r--r--scheduler/main.c18
1 files changed, 4 insertions, 14 deletions
diff --git a/scheduler/main.c b/scheduler/main.c
index b3df1d962..472b9946d 100644
--- a/scheduler/main.c
+++ b/scheduler/main.c
@@ -16,9 +16,6 @@
#include "cupsd.h"
#include <sys/resource.h>
#ifdef __APPLE__
-# include <os/object.h>
-typedef struct os_transaction_s *os_transaction_t;
-extern os_transaction_t os_transaction_create(const char *description);
# include <xpc/xpc.h>
# include <pthread/qos.h>
#endif /* __APPLE__ */
@@ -91,11 +88,7 @@ static int dead_children = 0;
static int stop_scheduler = 0;
/* Should the scheduler stop? */
static time_t local_timeout = 0;
- /* Next local printer timeout */
-#ifdef __APPLE__
-static os_transaction_t launchd_transaction = NULL;
- /* Transaction for launchd */
-#endif /* __APPLE__ */
+ /* Next local printer timeout */
/*
@@ -1972,7 +1965,7 @@ service_checkin(void)
free(ld_sockets);
# ifdef __APPLE__
- launchd_transaction = os_transaction_create("org.cups.cupsd.active-printing");
+ xpc_transaction_begin();
# endif /* __APPLE__ */
}
@@ -2114,11 +2107,8 @@ service_checkout(int shutdown) /* I - Shutting down? */
}
# ifdef __APPLE__
- if (OnDemand && shutdown && launchd_transaction)
- {
- os_release(launchd_transaction);
- launchd_transaction = NULL;
- }
+ if (OnDemand && shutdown)
+ xpc_transaction_end();
# endif /* __APPLE__ */
}