From 1b5acb582d273798abc49283e8a9b2dc81bd215b Mon Sep 17 00:00:00 2001 From: =?utf8?q?Zden=C4=9Bk=20Salvet?= Date: Wed, 20 Dec 2006 15:43:52 +0000 Subject: [PATCH] Return ENOENT error from QueryJobs if no matching job is found (LB part of fix for bug #22442). --- org.glite.lb.server/src/query.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/org.glite.lb.server/src/query.c b/org.glite.lb.server/src/query.c index 0d77044..7cbcc6e 100644 --- a/org.glite.lb.server/src/query.c +++ b/org.glite.lb.server/src/query.c @@ -400,8 +400,10 @@ limit_cycle_cleanup: edg_wll_FreeStmt(&sh); } while ( limit_loop ); - if ( eperm && !*jobs_out ) - edg_wll_SetError(ctx, EPERM, "matching jobs found but authorization failed"); + if ( !*jobs_out ) { + if (eperm) edg_wll_SetError(ctx, EPERM, "matching jobs found but authorization failed"); + else edg_wll_SetError(ctx, ENOENT, "no matching jobs found"); + } if ( i && (ret == 0) ) { -- 1.8.2.3