1. 01 Apr, 2019 1 commit
    • m's avatar
      Introduce a redisFD type · e84086cb
      m authored
      The redisFD type should be equal to the system native socket file
      desciptor type (for POSIX, this is a plain int).
      
      We also introduce the REDIS_INVALID_FD value, which maps to -1 on POSIX
      systems.
      e84086cb
  2. 21 Feb, 2019 1 commit
  3. 20 Feb, 2019 4 commits
  4. 26 Sep, 2018 1 commit
  5. 25 Sep, 2018 1 commit
  6. 01 May, 2018 1 commit
    • Justin Brewer's avatar
      Drop __redis_strerror_r · d1c1b668
      Justin Brewer authored
      
      
      Since _GNU_SOURCE is now guaranteed to be unset, it is no longer
      necessary to support the GNU-specific version of strerror_r.
      
      Drop __redis_strerror_r from the header, and call strerror_r directly.
      This breaks any external users of this macro, but they shouldn't have
      been using it in  the first place.
      Signed-off-by: default avatarJustin Brewer <jzb0012@auburn.edu>
      d1c1b668
  7. 22 Mar, 2017 1 commit
  8. 25 Oct, 2016 1 commit
    • Donald Whyte's avatar
      Remove trailing comma in redisConnectionType enum · 41b07dab
      Donald Whyte authored
      Remove trailing comma in last value of `redisConnectionType` enum. This causes a compiler warning on Solaris compilers. I'd like to build this on Solaris with `-Werror`. However, due to the trailing comma, I cannot do that.
      
      This PR removes the trailing comma, which should prevent it causing compiler warnings on any architecture.
      41b07dab
  9. 20 Apr, 2016 1 commit
  10. 18 Nov, 2015 1 commit
    • Jan-Erik Rediger's avatar
      Prevent buffer overflow when formatting the error · 0335cb3e
      Jan-Erik Rediger authored
      strncat might copy n+1 bytes (n bytes from the source plus a terminating nul byte).
      Also strncat appends after the first found nul byte. But all we pass is
      a buffer we might not have zeroed out already.
      
      Closes #380
      0335cb3e
  11. 27 Oct, 2015 1 commit
  12. 16 Sep, 2015 1 commit
  13. 25 Aug, 2015 1 commit
  14. 27 Jul, 2015 1 commit
  15. 03 May, 2015 1 commit
  16. 30 Apr, 2015 1 commit
    • Alex Balashov's avatar
      Renamed redisContext struct member 'unix' to 'unix_sock' to avoid encountering... · d132d676
      Alex Balashov authored
      Renamed redisContext struct member 'unix' to 'unix_sock' to avoid encountering defined constant 'unix' in GNU C environment (see commit d8145d79).
      
      Not all code using hiredis can compile using '-std=c99', and/or not all users are able to easily make that change to the build process of various open-source projects, so it is more pragmatic to choose a different identifier that does not impose this requirement.
      d132d676
  17. 16 Apr, 2015 4 commits
  18. 26 Jan, 2015 1 commit
    • Matt Stancliff's avatar
      Release hiredis 0.12.1 · 9be3a07d
      Matt Stancliff authored
      Major fix:
        - `make install` now works properly
      
      Minor fix:
        - `make test` now works after `make 32bit` on a 64-bit platform
        - added more automated travis tests
      9be3a07d
  19. 22 Jan, 2015 2 commits
    • Matt Stancliff's avatar
      Increase version to 0.12.0 · 7b51834c
      Matt Stancliff authored
      7b51834c
    • Matt Stancliff's avatar
      Improve digit counting for multibulk creation · 195aca34
      Matt Stancliff authored
      This replaces the old intlen() implementation with a slightly
      faster way of counting digits.
      
      Implementation taken from the same place where digits10() in
      redis/src/util.c came from.
      
      The old 'intlen' allowed negative inputs, but no usage in hiredis
      was passing negative numbers, so that ability is removed.  Also,
      the new implementation can count higher (uint64_t) instead of
      limited to just int as before.
      
      Fixes #295 by replacing implementation
      195aca34
  20. 05 Jan, 2015 6 commits
    • Matt Stancliff's avatar
      Fix errno error buffers to not clobber errors · cc202324
      Matt Stancliff authored
      The strerror_r API has two flavors depending on system options.
      
      The bad flavor uses a static buffer for returning results, so if
      you save the pointer from strerror_r, the string you're referencing
      becomes useless if anybody else calls strerror_r again
      
      The good flavor does what you expect: it writes the error to your buffer.
      
      This commit uses strerror_r directly if it's a good version or copies
      the static buffer into our private buffer if it's a bad version.
      
      Thanks to gemorin for explaining the problem and drafting a fix.
      
      Fixes #239
      cc202324
    • tzickel's avatar
      Refactor reading code into read.c · ba3e74c4
      tzickel authored
      Makes hiredis reading functions easier to include in external projects
      
      [fixed all merge conflicts against current version]
      
      Closes #249
      ba3e74c4
    • Matt Stancliff's avatar
      Add API to free hiredis (sds) formattings · 9a753b42
      Matt Stancliff authored
      External callers may not know about sdsfree, so let's
      give them an easy way to know how to free their sds result.
      9a753b42
    • Mareq's avatar
      Add API to free hiredis (char *) formattings · 1b392eb7
      Mareq authored
      [Cleaned up:
        - name of function: freeRedis... -> redisFree...
        - return value of function (free doesn't return anything)
        - parameter type for function.
          - we don't need to free a char**, the char** is just
          for returning from the assignment functoin.]
      
      Closes #250
      1b392eb7
    • 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
    • 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
  21. 10 Apr, 2014 1 commit
  22. 09 Apr, 2014 2 commits
  23. 08 Apr, 2014 1 commit
  24. 11 Jul, 2013 1 commit
  25. 29 Apr, 2013 1 commit
  26. 19 Apr, 2013 1 commit
    • Allen.Dou's avatar
      SetKeepAlive · 8d5bc445
      Allen.Dou authored
      Keep client alive even though no command was sent to server for a long time.
      8d5bc445
  27. 28 Aug, 2012 1 commit