hadoop-zookeeper-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From maha...@apache.org
Subject svn commit: r903063 - in /hadoop/zookeeper/trunk: CHANGES.txt src/c/src/zk_adaptor.h src/c/src/zk_hashtable.c src/c/src/zookeeper.c
Date Tue, 26 Jan 2010 03:11:21 GMT
Author: mahadev
Date: Tue Jan 26 03:11:19 2010
New Revision: 903063

URL: http://svn.apache.org/viewvc?rev=903063&view=rev
Log:
ZOOKEEPER-495. c client logs an invalid error when zookeeper_init is called with chroot (phunt
via mahadev)

Modified:
    hadoop/zookeeper/trunk/CHANGES.txt
    hadoop/zookeeper/trunk/src/c/src/zk_adaptor.h
    hadoop/zookeeper/trunk/src/c/src/zk_hashtable.c
    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=903063&r1=903062&r2=903063&view=diff
==============================================================================
--- hadoop/zookeeper/trunk/CHANGES.txt (original)
+++ hadoop/zookeeper/trunk/CHANGES.txt Tue Jan 26 03:11:19 2010
@@ -212,6 +212,9 @@
   ZOOKEEPER-413. two flaws need addressing in the c tests that can cause false
   positive failures (phunt via mahadev)
 
+  ZOOKEEPER-495. c client logs an invalid error when zookeeper_init is called
+  with chroot (phunt via mahadev)
+
 IMPROVEMENTS:
   ZOOKEEPER-473. cleanup junit tests to eliminate false positives due to
   "socket reuse" and failure to close client (phunt via mahadev)

Modified: hadoop/zookeeper/trunk/src/c/src/zk_adaptor.h
URL: http://svn.apache.org/viewvc/hadoop/zookeeper/trunk/src/c/src/zk_adaptor.h?rev=903063&r1=903062&r2=903063&view=diff
==============================================================================
--- hadoop/zookeeper/trunk/src/c/src/zk_adaptor.h (original)
+++ hadoop/zookeeper/trunk/src/c/src/zk_adaptor.h Tue Jan 26 03:11:19 2010
@@ -229,7 +229,7 @@
 void process_completions(zhandle_t *zh);
 int flush_send_queue(zhandle_t*zh, int timeout);
 char* sub_string(zhandle_t *zh, const char* server_path);
-void free_duplicate_path(char* free_path, const char* path);
+void free_duplicate_path(const char* free_path, const char* path);
 void zoo_lock_auth(zhandle_t *zh);
 void zoo_unlock_auth(zhandle_t *zh);
 

Modified: hadoop/zookeeper/trunk/src/c/src/zk_hashtable.c
URL: http://svn.apache.org/viewvc/hadoop/zookeeper/trunk/src/c/src/zk_hashtable.c?rev=903063&r1=903062&r2=903063&view=diff
==============================================================================
--- hadoop/zookeeper/trunk/src/c/src/zk_hashtable.c (original)
+++ hadoop/zookeeper/trunk/src/c/src/zk_hashtable.c Tue Jan 26 03:11:19 2010
@@ -268,7 +268,9 @@
 static void do_foreach_watcher(watcher_object_t* wo,zhandle_t* zh,
         const char* path,int type,int state)
 {
-    char *client_path = sub_string(zh, path);
+    // session event's don't have paths
+    const char *client_path =
+        (type != ZOO_SESSION_EVENT ? sub_string(zh, path) : path);
     while(wo!=0){
         wo->watcher(zh,type,state,client_path,wo->context);
         wo=wo->next;

Modified: hadoop/zookeeper/trunk/src/c/src/zookeeper.c
URL: http://svn.apache.org/viewvc/hadoop/zookeeper/trunk/src/c/src/zookeeper.c?rev=903063&r1=903062&r2=903063&view=diff
==============================================================================
--- hadoop/zookeeper/trunk/src/c/src/zookeeper.c (original)
+++ hadoop/zookeeper/trunk/src/c/src/zookeeper.c Tue Jan 26 03:11:19 2010
@@ -713,9 +713,9 @@
  * deallocated the free_path only its beeen allocated
  * and not equal to path
  */
-void free_duplicate_path(char *free_path, const char* path) {
+void free_duplicate_path(const char *free_path, const char* path) {
     if (free_path != path) {
-        free(free_path);
+        free((void*)free_path);
     }
 }
 



Mime
View raw message