From 4433d4b7ed0895532fba8582c0afe05d135e2a21 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Ji=C5=99=C3=AD=20Filipovi=C4=8D?= Date: Fri, 6 May 2011 08:24:03 +0000 Subject: [PATCH] - fixed RSS feeds with disable indexing - fixed empty RSS feeds --- org.glite.lb.server/src/lb_proto.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/org.glite.lb.server/src/lb_proto.c b/org.glite.lb.server/src/lb_proto.c index 039b4f8..73f1b2a 100644 --- a/org.glite.lb.server/src/lb_proto.c +++ b/org.glite.lb.server/src/lb_proto.c @@ -377,10 +377,13 @@ static int getJobsRSS(edg_wll_Context ctx, char *feedType, edg_wll_JobStat **sta } else{ *statesOut = NULL; + free(can_peername); return -1; } - edg_wll_QueryJobsServer(ctx, (const edg_wll_QueryRec **)conds, 0, &jobsOut, statesOut); + if (edg_wll_QueryJobsServer(ctx, (const edg_wll_QueryRec **)conds, 0, &jobsOut, statesOut)){ + *statesOut = NULL; + } for (i = 0; conds[i]; i++) free(conds[i]); @@ -779,7 +782,7 @@ edg_wll_ErrorCode edg_wll_Proto(edg_wll_Context ctx, // check if owner and lastupdatetime is indexed idx = 0; - for (i = 0; ctx->job_index[i]; i++) + if (ctx->job_index) for (i = 0; ctx->job_index[i]; i++) if (ctx->job_index[i]->attr == EDG_WLL_QUERY_ATTR_OWNER) idx++; else if (ctx->job_index[i]->attr == EDG_WLL_QUERY_ATTR_LASTUPDATETIME) @@ -788,7 +791,8 @@ edg_wll_ErrorCode edg_wll_Proto(edg_wll_Context ctx, ret = HTTP_NOTFOUND; edg_wll_SetError(ctx, ENOENT, "current index configuration does not support RSS feeds"); } - edg_wll_RSSFeed(ctx, states, requestPTR, &message); + else + edg_wll_RSSFeed(ctx, states, requestPTR, &message); /* GET [something else]: not understood */ } else ret = HTTP_BADREQ; -- 1.8.2.3