1. 26 Feb, 2021 3 commits
  2. 18 Oct, 2020 1 commit
    • michael-grunder's avatar
      Fix handling of NIL invalidation messages. · b9b9f446
      michael-grunder authored
      When CLIENT TRACKING is enabled, Redis will send an invalidation message
      with a NIL payload to all tracking clients after a FLUSHDB is executed.
      
      We didn't account for REDIS_REPLY_PUSH being a valid parent object to a
      NIL payload, and were failing an assertion.
      
      Additionally this commit adds a regression test for the logic.
      b9b9f446
  3. 12 Oct, 2020 1 commit
  4. 29 Jul, 2020 1 commit
    • Michael Grunder's avatar
      Move SSL management to a distinct private pointer. (#855) · d8ff7238
      Michael Grunder authored
      We need to allow our users to use redisContext->privdata as context
      for any RESP3 PUSH messages, which means we can't use it for managing
      SSL connections.
      
      Bulletpoints:
      
      * Create a secondary redisContext member for internal use only called
        privctx and rename the redisContextFuncs->free_privdata accordingly.
      
      * Adds a `free_privdata` function pointer so the user can tie allocated
        memory to the lifetime of a redisContext (like they can already do
        with redisAsyncContext)
      
      * Enables SSL tests in .travis.yml
      d8ff7238
  5. 26 Jul, 2020 1 commit
  6. 20 Jul, 2020 1 commit
    • Michael Grunder's avatar
      Resp3 oob push support (#841) · 2e7d7cba
      Michael Grunder authored
      Proper support for RESP3 PUSH messages.
      
      By default, PUSH messages are now intercepted and the reply memory freed.  
      This means existing code should work unchanged when connecting to Redis
      >= 6.0.0 even if `CLIENT TRACKING` were then enabled.
      
      Additionally, we define two callbacks users can configure if they wish to handle
      these messages in a custom way:
      
      void redisPushFn(void *privdata, void *reply);
      void redisAsyncPushFn(redisAsyncContext *ac, void *reply);
      
      See #825
      2e7d7cba
  7. 19 Jun, 2020 1 commit
  8. 07 Jun, 2020 1 commit
  9. 22 May, 2020 1 commit
    • Michael Grunder's avatar
      Allow users to replace allocator and handle OOM everywhere. (#800) · 8e0264cf
      Michael Grunder authored
      * Adds an indirection to every allocation/deallocation to allow users to 
        plug in ones of their choosing (use custom functions, jemalloc, etc).
      
      * Gracefully handle OOM everywhere in hiredis.  This should make it possible
        for users of the library to have more flexibility in how they handle such situations.
      
      * Changes `redisReaderTask->elements` from an `int` to a `long long` to prevent
        a possible overflow when transferring the task elements into a `redisReply`.
      
      * Adds a configurable `max elements` member to `redisReader` that defaults to
        2^32 - 1.  This can be set to "unlimited" by setting the value to zero.
      8e0264cf
  10. 21 May, 2020 1 commit
  11. 19 May, 2020 1 commit
  12. 12 Dec, 2019 1 commit
    • michael-grunder's avatar
      Free the reply in redisGetReply when passed NULL · ac0b186a
      michael-grunder authored
      We currently perform a NULL check in redisGetReply and don't push the
      reply back to the caller, but we don't free any reply meaning that this
      will leak memory:
      
      redisGetReply(context, NULL);
      
      This change simply frees the reply if we were passed NULL.
      
      Addresses #740
      ac0b186a
  13. 16 Sep, 2019 1 commit
    • Yossi Gottlieb's avatar
      Fix: redisReconnect() should clear SSL context. · d41443bd
      Yossi Gottlieb authored
      We should not attempt to keep the context and re-establish the
      TLS connection for several reasons:
      
      1. Maintain symmetry between redisConnect() and redisReconnect(), so in
      both cases an extra step is required to initiate SSL.
      2. The caller may also wish to reconfigure the SSL session and needs a
      chance to do that.
      3. It is not a practical thing to do on an async non-blocking connection
      context.
      d41443bd
  14. 29 Aug, 2019 1 commit
  15. 04 Aug, 2019 1 commit
  16. 10 Apr, 2019 1 commit
  17. 01 Apr, 2019 3 commits
    • m's avatar
      Port network layer to Winsock · dc6d19b9
      m authored
      With this change, Hiredis builds with MinGW and runs on Windows.
      dc6d19b9
    • 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
    • m's avatar
      Move network I/O calls to net.c · 1788f41f
      m authored
      This makes hiredis.c free from system calls related to socket I/O. This
      is also makes the treatment of raw socket connections more similar to
      the SSL backend.
      1788f41f
  18. 21 Feb, 2019 1 commit
  19. 20 Feb, 2019 7 commits
  20. 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
  21. 26 Sep, 2018 1 commit
  22. 21 May, 2018 1 commit
  23. 01 May, 2018 3 commits
  24. 05 Jan, 2018 1 commit
  25. 15 Jun, 2017 1 commit
  26. 13 May, 2016 1 commit
  27. 27 Oct, 2015 1 commit
  28. 14 Sep, 2015 1 commit