From 494d5eb28c401a892ed5bc074c3eba70838789fe Mon Sep 17 00:00:00 2001 From: =?utf8?q?Ale=C5=A1=20K=C5=99enek?= Date: Fri, 26 Jan 2007 11:01:13 +0000 Subject: [PATCH] handle unqualified tags only --- org.glite.lb.server/src/lb_plugin.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) 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)); -- 1.8.2.3