avro-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dcrea...@apache.org
Subject svn commit: r1102335 - in /avro/trunk: CHANGES.txt lang/c/src/avro_private.h
Date Thu, 12 May 2011 15:06:03 GMT
Author: dcreager
Date: Thu May 12 15:06:02 2011
New Revision: 1102335

URL: http://svn.apache.org/viewvc?rev=1102335&view=rev
Log:
AVRO-819. C: Fix file reader EOF detection

This patch fixes a bug that Miki Tebeka discovered in the file reader
code.  Errors weren't getting propagated correctly through the call
stack.  This caused the file reader to not correctly detect EOF, and so
you'd loop through the final block in a file twice.  (The second time
through, we wouldn't fill in the datum instance.)

Modified:
    avro/trunk/CHANGES.txt
    avro/trunk/lang/c/src/avro_private.h

Modified: avro/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/avro/trunk/CHANGES.txt?rev=1102335&r1=1102334&r2=1102335&view=diff
==============================================================================
--- avro/trunk/CHANGES.txt (original)
+++ avro/trunk/CHANGES.txt Thu May 12 15:06:02 2011
@@ -16,6 +16,8 @@ Avro 1.6.0 (unreleased)
 
     AVRO-818. C: Fix data file corruption bug in C library (dcreager)
 
+    AVRO-819. C: Fix file reader EOF detection (dcreager)
+
 Avro 1.5.1 (unreleased)
 
   NEW FEATURES

Modified: avro/trunk/lang/c/src/avro_private.h
URL: http://svn.apache.org/viewvc/avro/trunk/lang/c/src/avro_private.h?rev=1102335&r1=1102334&r2=1102335&view=diff
==============================================================================
--- avro/trunk/lang/c/src/avro_private.h (original)
+++ avro/trunk/lang/c/src/avro_private.h Thu May 12 15:06:02 2011
@@ -33,6 +33,7 @@
 		rval = call;				\
 		if (rval) {				\
 			avro_set_error(__VA_ARGS__);	\
+			return rval;			\
 		}					\
 	}
 
@@ -41,6 +42,7 @@
 		rval = call;				\
 		if (rval) {				\
 			avro_prefix_error(__VA_ARGS__);	\
+			return rval;			\
 		}					\
 	}
 



Mime
View raw message