From: Michal Voců Date: Tue, 11 Sep 2012 12:50:26 +0000 (+0000) Subject: more robust tag list parsing X-Git-Tag: glite-lb-client_R_5_2_7_1~6 X-Git-Url: http://scientific.zcu.cz/git/?a=commitdiff_plain;h=4e0c5e29ff9812f26ad58c42a39ce5e7b5dc847c;p=jra1mw.git more robust tag list parsing --- diff --git a/org.glite.lb.common/src/events_parse.c.T b/org.glite.lb.common/src/events_parse.c.T index fab9e78..5704892 100644 --- a/org.glite.lb.common/src/events_parse.c.T +++ b/org.glite.lb.common/src/events_parse.c.T @@ -59,7 +59,7 @@ int edg_wll_TagListParse(const char *src, edg_wll_TagValue **list) { if(NULL == *list) return -1; - for(p = strtok(src, ","), tag = *list; p; p = strtok(NULL, ","), tag++) { + for(p = strtok(src, ","), tag = *list; p; p = strtok(NULL, ",")) { char *s = strchr(p, '='); if(NULL == s || '\0' == *(s+1)) @@ -69,6 +69,7 @@ int edg_wll_TagListParse(const char *src, edg_wll_TagValue **list) { tag->tag = strdup(p); *s = '='; tag->value = strdup(s+1); + tag++; } tag->tag = NULL; tag->value = NULL;