Return ENOENT error from QueryJobs if no matching job is found
authorZdeněk Salvet <salvet@ics.muni.cz>
Wed, 20 Dec 2006 15:43:52 +0000 (15:43 +0000)
committerZdeněk Salvet <salvet@ics.muni.cz>
Wed, 20 Dec 2006 15:43:52 +0000 (15:43 +0000)
(LB part of fix for bug #22442).

org.glite.lb.server/src/query.c

index 0d77044..7cbcc6e 100644 (file)
@@ -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) )
        {