ack. inherited from the lrmd but not relevant now.
On Tue, Jun 21, 2011 at 3:47 AM, Russell Bryant russell@russellbryant.net wrote:
This flag was set to TRUE when a recurring action got cancelled. However, immediately after it's set the object gets freed. It's unsafe to rely on this flag for anything, so remove it to avoid letting anyone get misled.
Signed-off-by: Russell Bryant russell@russellbryant.net
src/lib/services.c | 1 - src/lib/services_linux.c | 2 +- src/lib/services_private.h | 1 - 3 files changed, 1 insertions(+), 3 deletions(-)
diff --git a/src/lib/services.c b/src/lib/services.c index 44d7f4d..f199ed5 100644 --- a/src/lib/services.c +++ b/src/lib/services.c @@ -126,7 +126,6 @@ services_action_cancel(const char *name, const char *action, int interval) return FALSE; }
- op->opaque->cancel = TRUE;
mh_debug("Removing %s", op->id); if (op->opaque->repeat_timer) { g_source_remove(op->opaque->repeat_timer); diff --git a/src/lib/services_linux.c b/src/lib/services_linux.c index 632d881..82e307f 100644 --- a/src/lib/services_linux.c +++ b/src/lib/services_linux.c @@ -234,7 +234,7 @@ operation_finished(mainloop_child_t *p, int status, int signo, int exitcode) } }
- if (op->interval && op->opaque->cancel == FALSE) {
- if (op->interval) {
recurring = 1; op->opaque->repeat_timer = g_timeout_add(op->interval, recurring_action_timer, diff --git a/src/lib/services_private.h b/src/lib/services_private.h index c413528..5a147ef 100644 --- a/src/lib/services_private.h +++ b/src/lib/services_private.h @@ -2,7 +2,6 @@ struct svc_action_private_s { char *exec; char *args[4];
- gboolean cancel;
guint repeat_timer; void (*callback)(svc_action_t *op); -- 1.7.5.4
Matahari mailing list Matahari@lists.fedorahosted.org https://fedorahosted.org/mailman/listinfo/matahari