From 80833e114a62349227e11131f08ee903d6a10542 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Zden=C4=9Bk=20=C5=A0ustr?= Date: Fri, 1 Jul 2011 12:36:55 +0000 Subject: [PATCH] Recognize summary and terminal flags --- org.glite.lb.common/interface/jobstat.h.T | 2 ++ org.glite.lb.common/src/xml_conversions.c | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/org.glite.lb.common/interface/jobstat.h.T b/org.glite.lb.common/interface/jobstat.h.T index c870a84..760b6a0 100644 --- a/org.glite.lb.common/interface/jobstat.h.T +++ b/org.glite.lb.common/interface/jobstat.h.T @@ -170,6 +170,8 @@ typedef struct _edg_wll_JobStat { #define EDG_WLL_STAT_CHILDSTAT 4 /**< apply the flags recursively to subjobs */ #define EDG_WLL_STAT_CHILDHIST_FAST 8 /**< partially complete histogram of child job states */ #define EDG_WLL_STAT_CHILDHIST_THOROUGH 16 /**< full and up-to date histogram of child job states */ +#define EDG_WLL_NOTIF_TERMINAL_STATES 64 /**< Generate notifications on terminal states */ +#define EDG_WLL_NOTIF_EVENT_SUMMARY 128 /**< Attach all job's events to the notification */ #define EDG_WLL_NOTIF_BOOTSTRAP 256 /**< send the state of the all already existing jobs too */ #define EDG_WLL_NOTIF_VOLATILE 512 /**< (not used yet) send the notifications directly, without reliability and persistency */ /* starting from bit 10 private flags begins - do not add 1024 and more! */ diff --git a/org.glite.lb.common/src/xml_conversions.c b/org.glite.lb.common/src/xml_conversions.c index f734bf5..adb88d4 100644 --- a/org.glite.lb.common/src/xml_conversions.c +++ b/org.glite.lb.common/src/xml_conversions.c @@ -773,6 +773,8 @@ char *edg_wll_stat_flags_to_string(int flags) if (flags & EDG_WLL_STAT_NO_STATES) append_flag(&cflags, "no_states"); if (flags & EDG_WLL_STAT_CHILDHIST_FAST) append_flag(&cflags, "childhist_fast"); if (flags & EDG_WLL_STAT_CHILDHIST_THOROUGH) append_flag(&cflags, "childhist_thorough"); + if (flags & EDG_WLL_NOTIF_TERMINAL_STATES) append_flag(&cflags, "terminal_states"); + if (flags & EDG_WLL_NOTIF_EVENT_SUMMARY) append_flag(&cflags, "event_summary"); if (flags & EDG_WLL_NOTIF_BOOTSTRAP) append_flag(&cflags, "bootstrap"); if (flags & EDG_WLL_NOTIF_VOLATILE) append_flag(&cflags, "volatile"); if (!cflags) cflags = strdup(""); @@ -797,6 +799,8 @@ int edg_wll_string_to_stat_flags(char *cflags) if (!strcmp(sflag,"no_states")) flags = flags | EDG_WLL_STAT_NO_STATES; if (!strcmp(sflag,"childhist_fast")) flags = flags | EDG_WLL_STAT_CHILDHIST_FAST; if (!strcmp(sflag,"childhist_thorough")) flags = flags | EDG_WLL_STAT_CHILDHIST_THOROUGH; + if (!strcmp(sflag,"terminal_states")) flags = flags | EDG_WLL_NOTIF_TERMINAL_STATES; + if (!strcmp(sflag,"event_summary")) flags = flags | EDG_WLL_NOTIF_EVENT_SUMMARY; if (!strcmp(sflag,"bootstrap")) flags = flags | EDG_WLL_NOTIF_BOOTSTRAP; if (!strcmp(sflag,"volatile")) flags = flags | EDG_WLL_NOTIF_VOLATILE; sflag = strtok_r(NULL, "+", &last); -- 1.8.2.3