From: Aleš Křenek Date: Fri, 11 Nov 2005 09:39:05 +0000 (+0000) Subject: avoid unnecessary coredump and try some error guess X-Git-Url: http://scientific.zcu.cz/git/?a=commitdiff_plain;h=6691c3f295cc2f4de177cc61d35a44bbc689f134;p=jra1mw.git avoid unnecessary coredump and try some error guess --- diff --git a/org.glite.jp.primary/src/is_client.c b/org.glite.jp.primary/src/is_client.c index d2d3f0d..5a0159b 100644 --- a/org.glite.jp.primary/src/is_client.c +++ b/org.glite.jp.primary/src/is_client.c @@ -108,9 +108,15 @@ int glite_jpps_single_feed( err.code = EIO; err.source = __FUNCTION__; err.desc = buf; - snprintf(buf,sizeof buf,"%s %s\n", + memset(buf, 0, sizeof(buf)); + if (ctx->other_soap->fault) { + snprintf(buf,sizeof buf,"%s %s\n", ctx->other_soap->fault->faultcode, ctx->other_soap->fault->faultstring); + } + else { + sprintf(buf,"No detailed error description (JP IS not running?)\n"); + } buf[999] = 0; glite_jp_stack_error(ctx,&err); }