predefined xids in c client

2012-06-10 Thread Michi Mutsuzaki
Hi, There are some predefined XIDs (like #define PING_XID -2) in zk_adaptor.h. Why do we need them? How do they avoid colliding with regular XIDs? Thanks! --Michi

Re: predefined xids in c client

2012-06-11 Thread Patrick Hunt
Regular xids are always non-negative. Patrick On Sun, Jun 10, 2012 at 12:15 AM, Michi Mutsuzaki wrote: > Hi, > > There are some predefined XIDs (like #define PING_XID -2) in > zk_adaptor.h. Why do we need them? How do they avoid colliding with > regular XIDs? > > Thanks! > --Michi

Re: predefined xids in c client

2012-06-12 Thread Michi Mutsuzaki
Hi Pat, How does the C client ensure that the regular xids are non-negative? The get_xid() function in st_adaptor.c doesn't seem to handle overflow. I guess I'm missing something obvious... http://svn.apache.org/viewvc/zookeeper/trunk/src/c/src/st_adaptor.c?revision=1038827&view=markup Thanks! -

Re: predefined xids in c client

2012-06-12 Thread Patrick Hunt
On Tue, Jun 12, 2012 at 12:51 AM, Michi Mutsuzaki wrote: > Hi Pat, > > How does the C client ensure that the regular xids are non-negative? > The get_xid() function in st_adaptor.c doesn't seem to handle > overflow. I guess I'm missing something obvious... > > http://svn.apache.org/viewvc/zookeepe