From 90ebf67225c4f4f248f7184580dfafb6435612aa Mon Sep 17 00:00:00 2001 From: =?utf8?q?Ji=C5=99=C3=AD=20Filipovi=C4=8D?= Date: Fri, 10 Aug 2007 16:22:25 +0000 Subject: [PATCH] Metadata can be fed without any other attributes. --- org.glite.jp.primary/src/feed.c | 29 ++++++++++++++--------------- 1 file changed, 14 insertions(+), 15 deletions(-) diff --git a/org.glite.jp.primary/src/feed.c b/org.glite.jp.primary/src/feed.c index 6e59a2c..c9128e9 100644 --- a/org.glite.jp.primary/src/feed.c +++ b/org.glite.jp.primary/src/feed.c @@ -495,15 +495,13 @@ static int feed_query_callback( goto cleanup; } -/* no attributes known -- can't match */ - if (!other) goto cleanup; - /* filter on non-meta query items */ - for (i=0; inother_qry; i++) { - for (j=0; other[j].name; j++) - if (check_qry_item(ctx,f->other_qry+i,other+j)) break; - if (!other[j].name) goto cleanup; /* no match is not an error */ - } + if (other) + for (i=0; inother_qry; i++) { + for (j=0; other[j].name; j++) + if (check_qry_item(ctx,f->other_qry+i,other+j)) break; + if (!other[j].name) goto cleanup; /* no match is not an error */ + } /* extract attributes to be fed, stack the job for a batch feed */ for (i=0; meta && meta[i].name; i++) @@ -514,13 +512,14 @@ static int feed_query_callback( nout++; } - for (i=0; other[i].name; i++) - for (j=0; jint_other_attr; j++) - if (!strcmp(other[i].name,f->other_attr[j])) { - out = realloc(out,(nout+2) * sizeof *out); - glite_jp_attrval_copy(out+nout,other+i); - nout++; - } + if (other) + for (i=0; other[i].name; i++) + for (j=0; jint_other_attr; j++) + if (!strcmp(other[i].name,f->other_attr[j])) { + out = realloc(out,(nout+2) * sizeof *out); + glite_jp_attrval_copy(out+nout,other+i); + nout++; + } if (nout) { int oi; -- 1.8.2.3