merged bug#11387 fixes from HEAD glite-lb-client_branch_2_1_0_2
authorJan Pospíšil <honik@ntc.zcu.cz>
Thu, 3 Nov 2005 20:16:31 +0000 (20:16 +0000)
committerJan Pospíšil <honik@ntc.zcu.cz>
Thu, 3 Nov 2005 20:16:31 +0000 (20:16 +0000)
org.glite.lb.client/src/prod_proto.c

index 7d24851..81bc727 100644 (file)
@@ -94,15 +94,17 @@ static
 int
 get_reply_plain(edg_wll_Context context, edg_wll_PlainConnection *conn, char **buf, int *code_min)
 {
-       char *msg;
+       char *msg=NULL;
        int len, code;
 
        code = 0;
        tmp_context = context;
        tmp_conn = conn;
        len = read_il_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");
@@ -140,14 +142,16 @@ static
 int
 get_reply_gss(edg_wll_Context context, edg_wll_GssConnection *conn, char **buf, int *code_min)
 {
-       char *msg;
+       char *msg=NULL;
        int code;
 
        tmp_context = context;
        tmp_gss_conn = conn;
        code = read_il_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");