Permalink
Commits on Jan 31, 2011
  1. Merge branch 'master' into over_locking

    Conflicts:
    	ext/zookeeper_lib.c
    jmhodges committed Jan 31, 2011
  2. Unlock on early returns in zkrb_enqueue and zkrb_queue_free

    May not need the dead variable with these in place.
    jmhodges committed Jan 31, 2011
Commits on Jan 29, 2011
  1. Fixes for pthread code.

    * 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.
    neilconway committed Jan 29, 2011
  2. Merge branch 'master' of github.com:twitter/zookeeper

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

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

    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.
    neilconway committed Jan 28, 2011
Commits on Jan 27, 2011
  1. Avoid incorrectly freeing a session context

    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.
    jmhodges committed Jan 27, 2011
  2. Fix #get() for paths without associated data.

    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.
    neilconway committed Jan 27, 2011
Commits on Jan 26, 2011
  1. Fix memory leak; disallow ops on closed ZK handle.

    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.
    neilconway committed Jan 26, 2011
  2. Avoid possible double free() of ZK handle.

    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.
    neilconway committed Jan 26, 2011
  3. Squelch compiler warning.

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

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

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

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

    Cleans up one possible SIGSEGV.
    jmhodges committed Jan 22, 2011
Commits on Jan 21, 2011
  1. moving the lock into zkrb_peek

    That was dumb. I have no memory of why I did that
    jmhodges committed Jan 20, 2011
Commits on Jan 20, 2011