From e10d1851ed7ba24a92869b15519dfdf22a1e1534 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Michal=20Voc=C5=AF?= Date: Tue, 28 Aug 2012 12:37:53 +0000 Subject: [PATCH] instruct IL to not send us faulty messages again --- org.glite.lb.server/src/request.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/org.glite.lb.server/src/request.c b/org.glite.lb.server/src/request.c index a9cf708..769c021 100644 --- a/org.glite.lb.server/src/request.c +++ b/org.glite.lb.server/src/request.c @@ -67,7 +67,7 @@ create_reply(const edg_wll_Context ctx, char **buf) err_code_min = 0; - switch(edg_wll_Error(ctx,NULL,&err_msg)) { + switch(err_code = edg_wll_Error(ctx,NULL,&err_msg)) { case 0: err_code = LB_OK; @@ -86,9 +86,14 @@ create_reply(const edg_wll_Context ctx, char **buf) break; default: - err_code = LB_DBERR; - err_code_min = edg_wll_Error(ctx,NULL,NULL); - break; + if(err_code > EDG_WLL_ERROR_BASE) { + /* that would mean parse error, do not bother sending it again */ + err_code = LB_PROTO; + } else { + err_code = LB_DBERR; + } + err_code_min = edg_wll_Error(ctx,NULL,NULL); + break; } -- 1.8.2.3