[ 
https://issues.apache.org/jira/browse/ZOOKEEPER-1028?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13012908#comment-13012908
 ] 

Ivan Kelly commented on ZOOKEEPER-1028:
---------------------------------------

This fix is wrong. 

Compilation gives a warning about invalid type being passed.

A good fix would be to change "struct Stat *stat = NULL"; to "struct Stat;" and 
pass &stat to zoo_set2. I've attached a patch to this effect. The current 
implementation passes a NULL pointer to zoo_set2, which means the stat never 
gets set.

> In python bindings, zookeeper.set2() should return a stat dict but instead 
> returns None
> ---------------------------------------------------------------------------------------
>
>                 Key: ZOOKEEPER-1028
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1028
>             Project: ZooKeeper
>          Issue Type: Bug
>          Components: contrib-bindings
>    Affects Versions: 3.3.3
>         Environment: All environments.
>            Reporter: Chris Medaglia
>            Assignee: Chris Medaglia
>            Priority: Minor
>              Labels: patch
>             Fix For: 3.4.0
>
>         Attachments: ZOOKEEPER-1028.diff, ZOOKEEPER-1028.patch
>
>   Original Estimate: 1h
>  Remaining Estimate: 1h
>
> There is a small bug in the python bindings, specifically with the 
> zookeeper.set2() call. This method should return a stat dictionary, but 
> actually returns None. The fix is a one-character change to zookeeper.c such 
> that the return value is '&stat' rather than 'stat'.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to