Permalink
Switch branches/tags
Commits on Feb 9, 2011
  1. Stamp 0.4.3; use a new URL in gemspec.

    neilconway committed Feb 9, 2011
    Previous URL 404s.
Commits on Feb 7, 2011
  1. Add Ruby's "libdir" to the library search path.

    neilconway committed Feb 7, 2011
    This is necessary if the default linker search path does not include
    the shared libraries for the version of Ruby being used.
  2. Fix think in read() call.

    neilconway committed Feb 7, 2011
Commits on Feb 6, 2011
  1. Use a pipe to notify Ruby thread of new ZK events.

    neilconway committed Feb 6, 2011
    Previous approach was to use polling with a period of 100 msec. The
    new approach is to associate a pipe with the queue that we use to
    send events from ZK to Ruby land. When the Ruby consumer runs out
    of events to process, it does rb_thread_select() on the pipe.
    Whenever the ZK side enqueues a new event, we write into the
    pipe.
  2. Remove unused variable.

    neilconway committed Feb 6, 2011
Commits on Jan 31, 2011
Commits on Jan 29, 2011
  1. Fixes for pthread code.

    neilconway committed Jan 29, 2011
    * Previous coding depending on recursive mutexes; since we can't
      easily guarantee those and use the static PTHREAD_MUTEX_INITIALIZER,
      just avoid the need for recursive mutexes for now.
    
    * Add a missing pthread_mutex_unlock() to an error return path.
    
    * Fix harmless compiler warning.
  2. Merge branch 'master' of github.com:twitter/zookeeper

    neilconway committed Jan 29, 2011
    Conflicts:
    	ext/zookeeper_lib.c
Commits on Jan 28, 2011
  1. Fix memory leak.

    neilconway committed Jan 28, 2011
  2. Fix memory leak in queue implementation.

    neilconway committed Jan 28, 2011
    The current coding pre-allocates the queue node for the next
    to-be-inserted queue element. This seems a strange way to
    do things, but I'll leave things as they are for now.
Commits on Jan 27, 2011
  1. Avoid incorrectly freeing a session context

    jmhodges committed Jan 27, 2011
    The check ZKH_SETUP_EVENT was incorrect for the zkrb_state_callback. req_id
    can be different from the global request id and still be using the same
    callback function. Nasty work. Fixes #1.
  2. Fix #get() for paths without associated data.

    neilconway committed Jan 27, 2011
    ZK allows a path to be created that has no associated data. In
    the previous coding, doing a #get() on such a path would result
    in raising a Ruby exception: zoo_get() returns data_len == -1
    for the path, which isn't a legal string length.
Commits on Jan 26, 2011
  1. Fix memory leak; disallow ops on closed ZK handle.

    neilconway committed Jan 26, 2011
    This patch fixes a per-connection memory leak: the previous
    coding allocated a zkrb_calling_context for each ZK handle
    but neglected to free it.
    
    This patch also raises a Ruby exception if any operations
    on performed on a closed ZK handle, until #reopen() is
    called. Such operations would just segfault anyway.
  2. Avoid possible double free() of ZK handle.

    neilconway committed Jan 26, 2011
    If #close() was invoked, zookeeper_close() might be invoked
    again by the Ruby GC, leading to a double free(). The previous
    coding also neglected to call zookeeper_close() on a
    non-connected ZK handle, which would leak resources.
  3. Squelch compiler warning.

    neilconway committed Jan 26, 2011
  4. Fix typo in zkrb_strings_stat_callback().

    neilconway committed Jan 26, 2011
    Previously assigned to the wrong union member -- not super likely
    to cause a problem, but illegal per C99 strict aliasing.
Commits on Jan 25, 2011
  1. Make use of strdup().

    neilconway committed Jan 25, 2011
    strlen() + strcpy() is silly.
  2. Fix compilation on OS X 10.6.

    neilconway committed Jan 25, 2011
    Not clear that this is the right fix, but unbreaks the build
    for me.
Commits on Jan 22, 2011
  1. Only free the calling_ctx after removing the data

    jmhodges committed Jan 22, 2011
    Cleans up one possible SIGSEGV.
Commits on Jan 21, 2011