hadoop-zookeeper-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From maha...@apache.org
Subject svn commit: r748672 - in /hadoop/zookeeper/trunk: CHANGES.txt src/c/src/zookeeper.c
Date Fri, 27 Feb 2009 20:03:09 GMT
Author: mahadev
Date: Fri Feb 27 20:03:08 2009
New Revision: 748672

URL: http://svn.apache.org/viewvc?rev=748672&view=rev
Log:
ZOOKEEPER-320. call auth completion in free_completions(). (chris darroch 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=748672&r1=748671&r2=748672&view=diff
==============================================================================
--- hadoop/zookeeper/trunk/CHANGES.txt (original)
+++ hadoop/zookeeper/trunk/CHANGES.txt Fri Feb 27 20:03:08 2009
@@ -14,6 +14,9 @@
 
   ZOOKEEPER-319. add locking around auth info in zhandle_t. (chris darroch via
 mahadev)
+
+  ZOOKEEPER-320. call auth completion in free_completions(). (chris darroch
+via mahadev)
  
 IMPROVEMENTS:
   ZOOKEEPER-308. improve the atomic broadcast performance 3x. (breed via

Modified: hadoop/zookeeper/trunk/src/c/src/zookeeper.c
URL: http://svn.apache.org/viewvc/hadoop/zookeeper/trunk/src/c/src/zookeeper.c?rev=748672&r1=748671&r2=748672&view=diff
==============================================================================
--- hadoop/zookeeper/trunk/src/c/src/zookeeper.c (original)
+++ hadoop/zookeeper/trunk/src/c/src/zookeeper.c Fri Feb 27 20:03:08 2009
@@ -761,6 +761,8 @@
     completion_head_t tmp_list;
     struct oarchive *oa;
     struct ReplyHeader h;
+    void_completion_t auth_completion = NULL;
+    const char *auth_data = NULL;
 
     lock_completion_list(&zh->sent_requests);
     tmp_list = zh->sent_requests;
@@ -800,6 +802,18 @@
             }
         }
     }
+
+    zoo_lock_auth(zh);
+    if (zh->auth.completion) {
+        auth_completion = zh->auth.completion;
+        auth_data = zh->auth.data;
+        zh->auth.completion = 0;
+    }
+    zoo_unlock_auth(zh);
+
+    if (auth_completion) {
+        auth_completion(reason, auth_data);
+    }
 }
 
 static void cleanup_bufs(zhandle_t *zh,int callCompletion,int rc)



Mime
View raw message