1. 26 Feb, 2021 5 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. 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
  4. 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
  5. 26 May, 2020 1 commit
  6. 25 May, 2020 1 commit
  7. 24 May, 2020 1 commit
  8. 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
  9. 21 May, 2020 1 commit
  10. 19 May, 2020 1 commit
  11. 04 May, 2020 1 commit
    • Michael Grunder's avatar
      Remove nested depth limitation. (#797) · eafb085d
      Michael Grunder authored
      * Remove nested depth limitation.
      
      This commit removes the nested multi-bulk depth limitation of 7.
      We do this by switching to pointer to pointer indirection and
      growing the stack in chunks when needed.
      
      See: #794, #421
      eafb085d
  12. 03 Apr, 2020 1 commit
    • Michael Grunder's avatar
      Win32 tests and timeout fix (#776) · cc9d0329
      Michael Grunder authored
      Unit tests in Windows and a Windows timeout fix
      
      This commit gets our unit tests compiling and running on Windows as well as removes a duplicated `timeval` -> `DWORD` conversion logic in sockcompat.c 
      
      There are minor differences in behavior between Linux and Windows to note:
      
      1.  In Windows, opening a non-existent hangs forever in WSAPoll whereas
          it correctly returns with a "Connection refused" error on Linux.
          For that reason, I simply skip this test in Windows.
      
          It may be related to this known issue:
          https://daniel.haxx.se/blog/2012/10/10/wsapoll-is-broken/
      
      2.  Timeouts are handled slightly differently in Windows and Linux.  
          In Linux, we intentionally set REDIS_ERR_IO for connection
          timeouts whereas in Windows we set REDIS_ERR_TIMEOUT.  It may be
          prudent to fix this discrepancy although there are almost certainly
          users relying on the current behavior.
      cc9d0329
  13. 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
  14. 25 Sep, 2019 1 commit
  15. 16 Sep, 2019 1 commit
    • Yossi Gottlieb's avatar
      Add SSL mode tests. · d952ed87
      Yossi Gottlieb authored
      This repeats all existing tests in SSL mode, but does not yet provide
      SSL-specific tests.
      d952ed87
  16. 14 May, 2019 1 commit
  17. 31 Mar, 2019 1 commit
  18. 26 Nov, 2018 1 commit
  19. 26 Sep, 2018 1 commit
  20. 21 May, 2018 1 commit
  21. 20 May, 2018 3 commits
  22. 19 May, 2018 1 commit
  23. 14 May, 2016 1 commit
  24. 20 Apr, 2016 1 commit
    • owent's avatar
      Add CI for Windows · 6c53d680
      owent authored
      - fix macro problem in mingw-gcc
      - fix typedef in cygwin
      6c53d680
  25. 17 Apr, 2016 1 commit
  26. 18 Nov, 2015 1 commit
    • Tom Lee's avatar
      Fix potential race in 'invalid timeout' tests · d4b715f0
      Tom Lee authored
      It's possible for the call to connect() to succeed on the very first
      try, in which case the logic for checking for invalid timeout fields is
      never executed. When this happens, the tests fail because they expect a
      REDIS_ERR_IO but no such failure has occurred.
      
      Tests aside, this is a potential source of irritating and hard-to-find
      intermittent bugs.
      
      This patch forces the validation to occur early so that we get
      predictable behavior whenever an invalid timeout is specified.
      d4b715f0
  27. 16 Sep, 2015 1 commit
  28. 16 Apr, 2015 2 commits
  29. 18 Feb, 2015 1 commit
  30. 22 Jan, 2015 1 commit
  31. 08 Jan, 2015 2 commits
  32. 29 May, 2014 1 commit