map ENOENT to HTTP_NOTFOUND
authorMiloš Mulač <mulac@civ.zcu.cz>
Wed, 4 Apr 2007 14:33:52 +0000 (14:33 +0000)
committerMiloš Mulač <mulac@civ.zcu.cz>
Wed, 4 Apr 2007 14:33:52 +0000 (14:33 +0000)
do not complain on jobids with no events

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

index 5a625bd..d7ce6fe 100644 (file)
@@ -347,6 +347,9 @@ abort:
                case EPERM:
                        ret = HTTP_UNAUTH;
                        break;
+               case ENOENT:
+                       ret = HTTP_NOTFOUND;
+                       break;
                
                /* fatal errors */
                case ENOMEM:
@@ -559,12 +562,6 @@ int purge_one(edg_wll_Context ctx,const edg_wlc_JobId job,int dump, int purge)
        }
 
        edg_wll_FreeStmt(&q);
-       if (ret == 0 && dumped == 0) {
-               if (ctx->strict_locking) unlock_and_check(ctx,job);
-               fprintf(stderr,"%s: no events, i.e. no such job or internal inconsistency\n",dbjob);
-               edg_wll_SetError(ctx,ENOENT,dbjob);
-               goto clean;
-       }
 
 unlock:
        if (ctx->strict_locking) unlock_and_check(ctx,job);