Switch branches/tags
Commits on Jan 31, 2011
  1. Merge branch 'master' into over_locking

    jmhodges committed Jan 31, 2011
  2. Unlock on early returns in zkrb_enqueue and zkrb_queue_free

    jmhodges committed Jan 31, 2011
    May not need the dead variable with these in place.
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

    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.

    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
  1. moving the lock into zkrb_peek

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