1. 20 Feb, 2019 1 commit
  2. 24 Oct, 2018 1 commit
    • Stefan Hacker's avatar
      Fix redisBufferRead documentation · 169fcc70
      Stefan Hacker authored
      Referred to redisContextReadReply which I cannot find in this codebase
      nor the old redis-tools one. Presumably this meant to say
      redisGetReplyFromReader which is how redisBufferRead is used in this
      file. Could've also meant the interface function redisReaderGetReply.
      169fcc70
  3. 26 Sep, 2018 1 commit
  4. 01 May, 2018 3 commits
  5. 05 Jan, 2018 1 commit
  6. 15 Jun, 2017 1 commit
  7. 13 May, 2016 1 commit
  8. 27 Oct, 2015 1 commit
  9. 14 Sep, 2015 1 commit
  10. 24 Aug, 2015 1 commit
  11. 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
  12. 16 Apr, 2015 2 commits
  13. 22 Jan, 2015 1 commit
    • 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
  14. 05 Jan, 2015 12 commits
    • Matt Stancliff's avatar
      Cleanup tabs and end of line whitespace · f28872ca
      Matt Stancliff authored
      f28872ca
    • 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
      Fix redisAppendCommand error result · 6a00a464
      Matt Stancliff authored
      Previously, redisvAppendCommand() would return OOM even with formatting
      errors.  Now we use OTHER with an error string telling the user the
      error was formatting related, not memory related.
      
      This also fixes a potentially worse bug where were would pass error result
      of -1 as an actual length to another function taking an unsigned length,
      which would result in crash/overallocation/errors.  Now for that case,
      we just return an error immediately and stop processing the command.
      
      Fixes #177
      6a00a464
    • NanXiao's avatar
      Add empty pointer check in error cleanup · e30c96eb
      NanXiao authored
      If realloc fails, the curargv will be NULL.
      
      Closes #253
      e30c96eb
    • NanXiao's avatar
      Add error check in redisContextInit · d1e820d8
      NanXiao authored
      Check whether the obuf or reader is empty: if one of the items is empty,
      free the redisContext.
      d1e820d8
    • Nan Xiao's avatar
      Fix redisvFormatCommand format parsing · b6a86079
      Nan Xiao authored
      Flags can occur in any order in format string, so we can't assume any order.
      
      In original code, the redisvFormatCommand can process " %#+d" correctly,
      but can't process "%+#d".
      
      Closes #257
      b6a86079
    • 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
    • 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
    • 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
  15. 29 May, 2014 1 commit
    • Daniel Melani's avatar
      Less surprising behaviour. · 05b85ebe
      Daniel Melani authored
      Make redisFree() and freeReplyObject() less surprising by behaving just
      like free(). That is, don't crash when passing in NULL.
      05b85ebe
  16. 10 Apr, 2014 1 commit
  17. 09 Apr, 2014 3 commits
  18. 08 Apr, 2014 1 commit
  19. 11 Jul, 2013 3 commits
  20. 29 Apr, 2013 1 commit
  21. 22 Jan, 2013 1 commit
  22. 12 Nov, 2012 1 commit