From ebfdbfd17c00bdeba3b65036f5daecace14436e0 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Ale=C5=A1=20K=C5=99enek?= Date: Mon, 1 Aug 2005 12:34:44 +0000 Subject: [PATCH] - cleanup of error handling for GetJob - clean error when not needed anymore --- org.glite.jp.primary/src/bones_server.c | 9 +++++++-- org.glite.jp.primary/src/soap_ops.c | 2 +- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/org.glite.jp.primary/src/bones_server.c b/org.glite.jp.primary/src/bones_server.c index 58d567a..dcc31d6 100644 --- a/org.glite.jp.primary/src/bones_server.c +++ b/org.glite.jp.primary/src/bones_server.c @@ -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); diff --git a/org.glite.jp.primary/src/soap_ops.c b/org.glite.jp.primary/src/soap_ops.c index 9fe77bf..3e95c26 100644 --- a/org.glite.jp.primary/src/soap_ops.c +++ b/org.glite.jp.primary/src/soap_ops.c @@ -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; } -- 1.8.2.3