always send owner with job feed (it is mandatory in WSDL)
authorMiloš Mulač <mulac@civ.zcu.cz>
Fri, 3 Mar 2006 13:27:03 +0000 (13:27 +0000)
committerMiloš Mulač <mulac@civ.zcu.cz>
Fri, 3 Mar 2006 13:27:03 +0000 (13:27 +0000)
org.glite.jp.primary/src/feed.c

index ab6df64..b7fe5ed 100644 (file)
@@ -273,6 +273,10 @@ int glite_jpps_match_file(
 
        fprintf(stderr,"%s: %s %s %s\n",__FUNCTION__,job,class,name);
 
+       memset(meta,0,sizeof meta);
+       meta[0].name = strdup(GLITE_JP_ATTR_OWNER);
+       glite_jppsbe_get_job_metadata(ctx,job,meta);
+
        if (!f) return 0;
        
        switch (glite_jpps_fplug_lookup_byclass(ctx,class,&pd)) {
@@ -340,10 +344,8 @@ int glite_jpps_match_file(
                        memset(fattr+j,0,sizeof *fattr);
 
                }
-               glite_jppsbe_get_job_metadata(ctx,job,meta);
                for (i=0; meta[i].name && strcmp(meta[i].name,GLITE_JP_ATTR_OWNER); i++);
                glite_jpps_single_feed(ctx,f->id,0,f->destination,job,meta[i].value,fattr);
-               for (i=0; meta[i].name; i++) glite_jp_attrval_free(meta+i,0);
                if (!fed) for (i=0; fattr[i].name; i++) glite_jp_attrval_free(fattr+i,0);
                free(fattr);
        }
@@ -351,6 +353,8 @@ int glite_jpps_match_file(
        for (i=0; vals[i].name; i++) glite_jp_attrval_free(vals+i,0);
        free(vals);
 
+       for (i=0; meta[i].name; i++) glite_jp_attrval_free(meta+i,0);
+
        return 0;
 }