- cleanup of error handling for GetJob
authorAleš Křenek <ljocha@ics.muni.cz>
Mon, 1 Aug 2005 12:34:44 +0000 (12:34 +0000)
committerAleš Křenek <ljocha@ics.muni.cz>
Mon, 1 Aug 2005 12:34:44 +0000 (12:34 +0000)
- clean error when not needed anymore

org.glite.jp.primary/src/bones_server.c
org.glite.jp.primary/src/soap_ops.c

index 58d567a..dcc31d6 100644 (file)
@@ -255,7 +255,6 @@ static int request(int conn,struct timeval *to,void *data)
 
        glite_gsplugin_set_timeout(glite_gsplugin_get_context(soap),to);
 
-/* FIXME: does not work, ask nykolas */
        soap->max_keep_alive = 1;       /* XXX: prevent gsoap to close connection */ 
        soap_begin(soap);
        if (soap_begin_recv(soap)) {
@@ -277,7 +276,13 @@ static int request(int conn,struct timeval *to,void *data)
        )
        {
                soap_send_fault(soap);
-               return ctx->error->code;        /* XXX: shall we die on some errors? */
+               if (ctx->error) {
+                       /* XXX: shall we die on some errors? */
+                       int     err = ctx->error->code;
+                       glite_jp_clear_error(ctx);
+                       return err;
+               }
+               return 0;
        }
 
        glite_jp_run_deferred(ctx);
index 9fe77bf..3e95c26 100644 (file)
@@ -442,7 +442,7 @@ SOAP_FMAC5 int SOAP_FMAC6 __jpsrv__GetJob(
                err.desc = "No file found for this job";
                glite_jp_stack_error(ctx,&err);
                err2fault(ctx,soap);
-               glite_jp_clear_error(ctx);
+//             glite_jp_clear_error(ctx);
                return SOAP_FAULT;
        }