hadoop-zookeeper-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From maha...@apache.org
Subject svn commit: r1028373 - in /hadoop/zookeeper/trunk: CHANGES.txt src/c/src/zookeeper.c
Date Thu, 28 Oct 2010 16:19:52 GMT
Author: mahadev
Date: Thu Oct 28 16:19:52 2010
New Revision: 1028373

URL: http://svn.apache.org/viewvc?rev=1028373&view=rev
Log:
ZOOKEEPER-897. C Client seg faults during close (jared cantwell via mahadev)

Modified:
    hadoop/zookeeper/trunk/CHANGES.txt
    hadoop/zookeeper/trunk/src/c/src/zookeeper.c

Modified: hadoop/zookeeper/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/zookeeper/trunk/CHANGES.txt?rev=1028373&r1=1028372&r2=1028373&view=diff
==============================================================================
--- hadoop/zookeeper/trunk/CHANGES.txt (original)
+++ hadoop/zookeeper/trunk/CHANGES.txt Thu Oct 28 16:19:52 2010
@@ -140,6 +140,8 @@ BUGFIXES: 
   ZOOKEEPER-904. super digest is not actually acting as a full superuser
   (Camille Fournier via mahadev)
 
+  ZOOKEEPER-897. C Client seg faults during close (jared cantwell via mahadev)
+
 IMPROVEMENTS:
   ZOOKEEPER-724. Improve junit test integration - log harness information 
   (phunt via mahadev)

Modified: hadoop/zookeeper/trunk/src/c/src/zookeeper.c
URL: http://svn.apache.org/viewvc/hadoop/zookeeper/trunk/src/c/src/zookeeper.c?rev=1028373&r1=1028372&r2=1028373&view=diff
==============================================================================
--- hadoop/zookeeper/trunk/src/c/src/zookeeper.c (original)
+++ hadoop/zookeeper/trunk/src/c/src/zookeeper.c Thu Oct 28 16:19:52 2010
@@ -2290,7 +2290,11 @@ int zookeeper_close(zhandle_t *zh)
 
     zh->close_requested=1;
     if (inc_ref_counter(zh,0)!=0) {
-        cleanup_bufs(zh, 1, ZCLOSING);
+	/* Signal any syncronous completions before joining the threads */
+        enter_critical(zh);
+        free_completions(zh,1,ZCLOSING);
+        leave_critical(zh);
+
         adaptor_finish(zh);
         return ZOK;
     }



Mime
View raw message