andreiz / php-zookeeper

A PHP extension for interfacing with Apache ZooKeeper
Other
449 stars 215 forks source link

+NOTCONNECTED_STATE #14

Closed Gutza closed 12 years ago

Gutza commented 12 years ago

This wasn't included; it's returned by getState() e.g. if you call it just after calling connect().

andreiz commented 11 years ago

What version of zookeeper has this constant? I have 3.4.3 and it's not in it.

Gutza commented 11 years ago

Actually, 3.4.0 -- it was introduced in the patch for this bug: https://issues.apache.org/jira/browse/ZOOKEEPER-1108

andreiz commented 11 years ago

Then we need code to conditionally provide this constant depending on the version of libzookeeper we are compiling against. It's broken as it is right now. Could you please provide that via pull request?

On Wed, Jan 9, 2013 at 5:40 AM, Gutza notifications@github.com wrote:

Actually, 3.4.0 -- it was introduced in the patch for this bug: https://issues.apache.org/jira/browse/ZOOKEEPER-1108

— Reply to this email directly or view it on GitHubhttps://github.com/andreiz/php-zookeeper/pull/14#issuecomment-12044464.

Gutza commented 11 years ago

I'm not at all good with the C side of things, but my understanding of the code is that php-zookeeper defines its own state constants. If that's the case, then any issues you encounter during compilation must be related to inconsistencies within php-zookeeper, not to inconsistencies BETWEEN php-zookeeper and the zookeeper library.

I certainly might have messed something up when I sent the pull request (I never compiled the thing myself), but I need to understand where the problem might lie before attempting to fix it...

Gutza commented 11 years ago

I just remembered I had a similar conversation with Bogdan Albei a while back; maybe this helps: https://github.com/andreiz/php-zookeeper/pull/16#issuecomment-10157670

andreiz commented 11 years ago

We need to conditionally compile that constant in. Guess I'll take care of it.

On Wed, Jan 9, 2013 at 10:33 AM, Gutza notifications@github.com wrote:

I just remembered I had a similar conversation with Bogdan Albei a while back; maybe this helps: #16https://github.com/andreiz/php-zookeeper/issues/16#issuecomment-10157670

— Reply to this email directly or view it on GitHubhttps://github.com/andreiz/php-zookeeper/pull/14#issuecomment-12059500.

Gutza commented 11 years ago

Ok then; sorry for having you finish the job for me, I really thought it was just an independent constant that didn't really affect anything -- in fact, all I ever intended was for the PHP constant to be available, since I don't think you'll be using the C constant in the foreseeable future... Anyway, thank you!