1. 05 Jan, 2015 12 commits
    • Chris Lamb's avatar
      Fix build under kfreebsd · 85c6bfb0
      Chris Lamb authored
      
      Signed-off-by: default avatarChris Lamb <chris@chris-lamb.co.uk>
      
      [Instead of checking for "not solaris" we feature detect
      for availability of what we want, then remove the system
      that advertises compatability but doesn't actually provide it
      (given our assumptions about what we're guarding).]
      
      Closes #254
      85c6bfb0
    • Matt Stancliff's avatar
      Fix clang analyzer warning · 9b83ddc2
      Matt Stancliff authored
      redisAsyncInitialize() can return NULL, but then we pass
      the return value from redisAsyncInitialize() into something
      dereferencing the return value, which can cause crashies.
      9b83ddc2
    • mike's avatar
      Add support for SO_REUSEADDR · 7c4d2557
      mike authored
      [This introduces some new API functions.]
      
      * Adds new flag to the connection context indicating SO_REUSEADDR
        should be set.
      * Adds max number of retries constant for when connect() hits
        EADDRNOTAVAIL.
      * Adds new function, redisAsyncConnectBindWithReuse(), letting
        clients enable this functionality.
      
      [Removed trailing whitespace in new header lines.]
      
      Closes #264
      7c4d2557
    • jinguoli's avatar
      Improve calloc() correctness · a1bc89b2
      jinguoli authored
      [It doesn't _actually_ matter, but technically
      the order argument is: (number of items, size of items)]
      
      Closes #279
      a1bc89b2
    • torque's avatar
      Cleanup libuv adapter · 9c573144
      torque authored
      This:
        - Removes misplaced libuv function prototype
        - Includes stdlib for free()
      
      Closes #251
      9c573144
    • michael-grunder's avatar
      Improve redisAppendCommandArgv performance · 40f7035b
      michael-grunder authored
      OK, perhaps the second time is a charm.  I forgot that I had
      hiredis forked from a long time ago, so the initial pull
      request was hosed.  :)
      
      * Pulled in sdscatfmt() from Redis, and modified it to accept a
        size_t (%T) style format specifier.
      
      * Pulled in sdsll2str() and sdsull2str() from Redis (needed by
        sdscatfmt).
      
      * Added a new method, redisFormatSdsCommandArgv() which takes
        and sds* as the target, rather than char* (and uses sdscatfmt
        instead of sprintf for the construction).
      
      I get roughly the following improvement:
      
      Old: 1.044806
      New: 0.481620
      
      The benchmark code itself can be found here:
      https://gist.github.com/michael-grunder/c92ef31bb632b3d0ad81
      
      Closes #260
      40f7035b
    • Hang Su's avatar
      Use stricter function argument types · 3315c098
      Hang Su authored
      'const' where we can.
      
      Closes #268
      3315c098
    • Chris Williams's avatar
      Fix README typos · 865a3683
      Chris Williams authored
      Closes #267
      865a3683
    • Gary Grossman's avatar
      Fix minor comment problems · 2d814b8d
      Gary Grossman authored
      "sdscatpritf" -> "sdscatprintf"
      Example used sdsempty("text") but should say sdsnew("text")
      
      Closes #282
      2d814b8d
    • Mohnish Thallavajhula's avatar
      Fix README typo · abbd3407
      Mohnish Thallavajhula authored
      Closes #285
      abbd3407
    • Jan-Erik Rediger's avatar
      Free string if it is unused · 2a6dbdd2
      Jan-Erik Rediger authored
      If the string is already in the dict, we need to free this.
      
      Original fix by @tt33415366.
      
      Fixes #256
      Closes #286
      2a6dbdd2
    • Ryan Jacobs's avatar
      Add syntax highlighting to README.md · a1f6ce01
      Ryan Jacobs authored
      Closes #293
      a1f6ce01
  2. 19 Sep, 2014 1 commit
  3. 18 Sep, 2014 1 commit
  4. 29 May, 2014 3 commits
  5. 10 Apr, 2014 4 commits
  6. 09 Apr, 2014 10 commits
  7. 08 Apr, 2014 4 commits
    • Matt Stancliff's avatar
      Add ability to bind source address on connect · 37d25a39
      Matt Stancliff authored
      Some environments require binding to specific source addresses instead
      of letting the system determine which IP a connection should originate
      from.
      
      Closes #233
      37d25a39
    • Matt Stancliff's avatar
      Fix potential undefined struct read · 61eeedbe
      Matt Stancliff authored
      All the assignments to cb are inside conditionals, so it's
      vaguely possible it never gets initialized before we try
      to read from it with (cb.fn == NULL).
      
      Condition discovered with scan-build.
      
      Closes #229
      61eeedbe
    • Matt Stancliff's avatar
      Stop redisCheckSocketError from more than checking · e35266e6
      Matt Stancliff authored
      redisCheckSocketError should only CheckSocketError and not
      close any misbehaving sockets.  If CheckSocketError discovers
      a problem, the caller will discover the contest is in ERR
      and will start destroying the context (which involves
      finalizing all callbacks (which may still be using
      fd for something, so we should not close fd until all
      callbacks have been told we are failing) and eventually
      close the fd in redisFree() immediately before the
      context is released).
      e35266e6
    • Matt Stancliff's avatar
      Remove possiblity of multiple close on same fd · 7f0c7a29
      Matt Stancliff authored
      With all the async connects and disconnects and error handling
      going on in hiredis, we need to centralize how we close our fd
      and set it so it doesn't get re-closed.  Prior to this commit,
      sometimes we'd close(fd), run an async error handler, then
      call close(fd) again.
      
      To stop multiple closes, we now set fd to -1 after we free it,
      but that requires not passing fd as an independent argument to
      functions.
      
      This commit moves all fd usage to c->fd.  Since the context
      has a fd field and all functions receive the context, it makes
      more sense to use the fd inside of c instead of passing along fd
      as an independent argument.
      
      Also, by only using c->fd, we can set c->fd after we close it to
      signify we shouldn't re-close the same fd again.
      
      This does change one semi-public interface function redisCheckSocketError()
      to only take (context) instead of (context, fd).  A search on github
      returned zero occasions of people using redisCheckSocketError()
      outside of net.{c,h} in hiredis itself.
      
      Commit inspired by the bug report at:
      https://groups.google.com/forum/#!topic/redis-db/mQm46XkIPOY
      
      Thanks go out to Thijs for trying high-frequency reconnects on
      a host that isn't there.
      
      Closes #230
      7f0c7a29
  8. 15 Jan, 2014 3 commits
  9. 11 Jul, 2013 2 commits