From 520303a9e01605558f7b85c540eebb34dbd4512d Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jan=20Posp=C3=AD=C5=A1il?= Date: Thu, 29 Sep 2005 21:02:40 +0000 Subject: [PATCH] report error if read_il_data() fails --- org.glite.lb.client/src/prod_proto.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/org.glite.lb.client/src/prod_proto.c b/org.glite.lb.client/src/prod_proto.c index 367d9c1..8c6004b 100644 --- a/org.glite.lb.client/src/prod_proto.c +++ b/org.glite.lb.client/src/prod_proto.c @@ -106,15 +106,16 @@ get_reply_plain(edg_wll_Context context, edg_wll_PlainConnection *conn, char **b data.conn = conn; code = 0; len = read_il_data(&data, &msg, plain_reader); - if(len < 0) + if(len < 0) { + edg_wll_SetError(context, LB_PROTO, "get_reply_plain(): error reading message"); goto get_reply_plain_end; + } if(decode_il_reply(&code, code_min, buf, msg) < 0) { edg_wll_SetError(context, LB_PROTO, "get_reply_plain(): error decoding message"); goto get_reply_plain_end; } - get_reply_plain_end: if(msg) free(msg); return edg_wll_Error(context,NULL,NULL); @@ -151,8 +152,10 @@ get_reply_gss(edg_wll_Context context, edg_wll_GssConnection *conn, char **buf, data.ctx = context; data.conn = conn; code = read_il_data(&data, &msg, gss_reader); - if(code < 0) + if(code < 0) { + edg_wll_SetError(context, LB_PROTO, "get_reply_gss(): error reading reply"); goto get_reply_gss_end; + } if(decode_il_reply(&code, code_min, buf, msg) < 0) { edg_wll_SetError(context, LB_PROTO, "get_reply_gss(): error decoding reply"); -- 1.8.2.3