From: Aleš Křenek Date: Fri, 26 Jan 2007 11:01:13 +0000 (+0000) Subject: handle unqualified tags only X-Git-Tag: gridsite-core_R_1_4_0~31 X-Git-Url: http://scientific.zcu.cz/git/?a=commitdiff_plain;h=494d5eb28c401a892ed5bc074c3eba70838789fe;p=jra1mw.git handle unqualified tags only --- diff --git a/org.glite.lb.server/src/lb_plugin.c b/org.glite.lb.server/src/lb_plugin.c index 6ed311e..770c343 100644 --- a/org.glite.lb.server/src/lb_plugin.c +++ b/org.glite.lb.server/src/lb_plugin.c @@ -646,17 +646,18 @@ static int lb_query(void *fpctx,void *handle,const char* ns, const char *attr,gl av[0].timestamp = h->status.lastUpdateTime.tv_sec; free(val); } - } else if (strncmp(attr, GLITE_JP_LBTAG_NS, sizeof(GLITE_JP_LBTAG_NS)-1) == 0) { - tag = strrchr(attr, ':'); - if (h->events && tag) { - tag++; + } else if (strcmp(ns, GLITE_JP_LBTAG_NS) == 0) { + if (h->events) { i = 0; n_tags = 0; while (h->events[i]) { - if ((h->events[i]->type == EDG_WLL_EVENT_USERTAG) && + if (h->events[i]->type == EDG_WLL_EVENT_USERTAG && + /* unqualified LB tags only */ + !strchr(h->events[i]->userTag.name,':') && /* XXX: LB tag names are case-insensitive */ - (strcasecmp(h->events[i]->userTag.name, tag) == 0) ) { + strcasecmp(h->events[i]->userTag.name, attr) == 0 ) + { av = realloc(av, (n_tags+2) * sizeof(glite_jp_attrval_t)); memset(&av[n_tags], 0, 2 * sizeof(glite_jp_attrval_t));