[systemd-devel] [PATCH] core: Don't assert on calendar timers

poljar (Damir Jelić) poljarinho at gmail.com
Tue Jan 8 09:20:07 PST 2013


Since the introduction of calender timers the timer base can also end
with "Calendar" but systemd asserts if its doesn't end with Sec.

Now the assert checks also for "Calendar"
---
 src/core/dbus-timer.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/core/dbus-timer.c b/src/core/dbus-timer.c
index 11d18cb..eb13610 100644
--- a/src/core/dbus-timer.c
+++ b/src/core/dbus-timer.c
@@ -75,7 +75,7 @@ static int bus_timer_append_timers(DBusMessageIter *i, const char *property, voi
                 bool b;
 
                 t = timer_base_to_string(k->base);
-                assert(endswith(t, "Sec"));
+                assert(endswith(t, "Sec") || endswith(t, "Calendar"));
 
                 /* s/Sec/USec/ */
                 l = strlen(t);
-- 
1.8.1



More information about the systemd-devel mailing list