andreiz/php-zookeeper — pull request #16 by bogdanalbei (2012-11-07 17:43:30+00:00)
Title: NOTCONNECTED_STATE undeclared

Hi,
I was getting NOTCONNECTED_STATE undeclared while compiling the extension with Zookeeper 3.4.4. The NOTCONNECTED_STATE constant is not very useful anyway, CONNECTED_STATE can be used to find out if you're connected.
Even the Zookeeper authors are not really using that constant in the library:

~/zookeeper-3.4.4/src/c $ grep -R NOTCONNECTED_STATE *
src/zookeeper.c: zh->state = NOTCONNECTED_STATE_DEF;
src/zk_adaptor.h:#define NOTCONNECTED_STATE_DEF 999
tests/TestZookeeperInit.cc: CPPUNIT_ASSERT(zh->state == NOTCONNECTED_STATE_DEF);