summaryrefslogtreecommitdiff
path: root/recipes/ffalarms/atd-over-fso
diff options
context:
space:
mode:
authorƁukasz Pankowski <lukpank@o2.pl>2010-04-20 22:05:18 +0200
committerMartin Jansa <Martin.Jansa@gmail.com>2010-04-21 11:08:25 +0200
commit188d4e13e053a9ced622469332e111d2460817a6 (patch)
tree913ac47e50052af75495f9d6dd071c3c5502e876 /recipes/ffalarms/atd-over-fso
parent3bd39c9455ad0522f2686841180c13a158b56257 (diff)
atd-over-fso: also support for fsotdld API (incompatible to frameworkd otimed)
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Diffstat (limited to 'recipes/ffalarms/atd-over-fso')
-rw-r--r--recipes/ffalarms/atd-over-fso/run-over-fso.patch33
1 files changed, 21 insertions, 12 deletions
diff --git a/recipes/ffalarms/atd-over-fso/run-over-fso.patch b/recipes/ffalarms/atd-over-fso/run-over-fso.patch
index 425aca45fb..be79ea077c 100644
--- a/recipes/ffalarms/atd-over-fso/run-over-fso.patch
+++ b/recipes/ffalarms/atd-over-fso/run-over-fso.patch
@@ -1,5 +1,5 @@
--- src/atd.c-orig 2004-02-02 16:30:39.000000000 +0100
-+++ src/atd.c 2009-09-15 22:57:35.000000000 +0200
++++ src/atd.c 2010-04-20 19:23:10.000000000 +0200
@@ -7,10 +7,12 @@
* Copyright (C) 1996, Paul Gortmaker
* Copyright (C) 2001, Russell Nelson
@@ -184,7 +184,7 @@
}
-@@ -345,11 +242,223 @@
+@@ -345,11 +242,232 @@
}
@@ -300,20 +300,29 @@
+
+void atd_alarm_waitfor(AtdAlarm *self, time_t t)
+{
-+GError *error;
++GError *error1, *error2;
+
+ if (!t)
+ return;
+
+ rtc_set_time();
-+ error = NULL;
++ error1 = error2 = NULL;
+ if (self->alarm_proxy == NULL) {
-+ g_printerr(OTIMED " not running, could not call SetAlarm\n");
-+ } else if (!dbus_g_proxy_call(self->alarm_proxy, "SetAlarm", &error,
-+ G_TYPE_STRING, DBUS_NAME,
-+ G_TYPE_INT, t, G_TYPE_INVALID,
-+ G_TYPE_INVALID)) {
-+ display_free_g_error(&error);
++ g_printerr(OTIMED " not running, could not call"
++ " AddAlarm or SetAlarm\n");
++ } else if (dbus_g_proxy_call(self->alarm_proxy, "AddAlarm", &error1,
++ G_TYPE_STRING, DBUS_NAME,
++ G_TYPE_INT, t, G_TYPE_INVALID,
++ G_TYPE_INVALID) ||
++ dbus_g_proxy_call(self->alarm_proxy, "SetAlarm", &error2,
++ G_TYPE_STRING, DBUS_NAME,
++ G_TYPE_INT, t, G_TYPE_INVALID,
++ G_TYPE_INVALID)) {
++ if (error1 != NULL)
++ g_error_free(error1);
++ } else {
++ display_free_g_error(&error1);
++ display_free_g_error(&error2);
+ }
+#ifdef DEBUG
+ printf("DBus waitfor: %d\n", (int) t);
@@ -410,7 +419,7 @@
argv0 = strrchr(argv[0], '/');
if (!argv0)
-@@ -362,17 +471,36 @@
+@@ -362,17 +480,36 @@
die("cannot chdir");
if (!strcmp (argv0, "atq"))
exit_atq();
@@ -452,7 +461,7 @@
/* run all the jobs in the past */
now = time (NULL);
scan_from_top ();
-@@ -402,8 +530,7 @@
+@@ -402,8 +539,7 @@
#endif
if (next == ULONG_MAX)
next = 0;