zookeeper-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rgs1 <...@git.apache.org>
Subject [GitHub] zookeeper pull request #522: ZOOKEEPER-1919 Update the C implementation of r...
Date Sun, 20 May 2018 20:27:06 GMT
Github user rgs1 commented on a diff in the pull request:

    https://github.com/apache/zookeeper/pull/522#discussion_r189469556
  
    --- Diff: src/c/src/zookeeper.c ---
    @@ -4056,22 +4075,33 @@ int zoo_aremove_watchers(zhandle_t *zh, const char *path, ZooWatcherType
wtype,
     
         oa = create_buffer_oarchive();
         rc = serialize_RequestHeader(oa, "header", &h);
    -    rc = rc < 0 ? rc : serialize_RemoveWatchesRequest(oa, "req", &req);
    -    if (rc < 0) {
    +
    +	if (all) {
    +       req.remove.path = (char*)server_path;
    +       req.remove.type = wtype;
    +       rc = rc < 0 ? rc : serialize_RemoveWatchesRequest(oa, "req", &req.remove);
    +    } else {
    +        req.check.path = (char*)server_path;
    +        req.check.type = wtype;
    +        rc = rc < 0 ? rc : serialize_CheckWatchesRequest(oa, "req", &req.check);
    +	}
    +
    +	if (rc < 0) {
    --- End diff --
    
    ditto


---

Mime
View raw message