[Pvfs2-cvs] commit by pw in pvfs2/src/proto: PINT-reqproto-encode.c

CVS commit program cvs at parl.clemson.edu
Tue May 8 17:09:21 EDT 2007


Update of /projects/cvsroot/pvfs2/src/proto
In directory parlweb1:/tmp/cvs-serv17875/src/proto

Modified Files:
	PINT-reqproto-encode.c 
Log Message:
Avoid a useless error about unknown encoding type in error path.


Index: PINT-reqproto-encode.c
===================================================================
RCS file: /projects/cvsroot/pvfs2/src/proto/PINT-reqproto-encode.c,v
diff -u -p -p -u -r1.31 -r1.32
--- PINT-reqproto-encode.c	8 May 2007 15:31:36 -0000	1.31
+++ PINT-reqproto-encode.c	8 May 2007 21:09:21 -0000	1.32
@@ -167,6 +167,7 @@ int PINT_decode(void* input_buffer,
     int proto_major_recved, proto_minor_recved;
 
     gossip_debug(GOSSIP_ENDECODE_DEBUG,"PINT_decode\n");
+    target_msg->enc_type = -1;  /* invalid */
 
     /* sanity check size */
     if(size < PINT_ENC_GENERIC_HEADER_SIZE)
@@ -315,6 +316,11 @@ void PINT_decode_release(struct PINT_dec
     {
         PINT_encoding_table[input_buffer->enc_type]->op->decode_release(
             input_buffer, input_type);
+    }
+    else if (input_buffer->enc_type == -1)
+    {
+        /* invalid return from PINT_decode, quietly return */
+        ;
     }
     else
     {



More information about the Pvfs2-cvs mailing list