summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2020-08-07Don't use non-installed win32.h helper in examples (#863)Michael Grunder
See: #862
2020-08-03Merge tag 'v1.0.0'michael-grunder
Release of v1.0.0 Hiredis v1.0.0 marks the first stable release of Hiredis and introduces RESP3 support, SSL connections, allocator injection, better Windows support, and more. IMPORTANT: There are breaking changes in this release meaning your code will need to be recompiled and may need small changes. The exact details of the breaking changes can be found in README.md. CHANGELOG.md has a detailed list of changes between v0.14.1 and v1.0.0. ~~~ Thank you to everyone who contriubuted to the project by submitting PRs, reporting bugs, or helping answer people's questions. And a special thank you to the following people who contributed at least five lines of code to this release (sorted by lines contributed) \o/ Michael Grunder, Yossi Gottlieb, Mark Nunberg, Marcus Geelnard, Justin Brewer, Minun Dragonation, Omri Steiner, Sangmoon Yi, Jinjiazh, Odin Hultgren Van Der Horst, Nick Rivera, Qi Yang, kevin1018
2020-08-03Prepare for v1.0.0 GAmichael-grunder
2020-07-31Define a no op assert if we detect NDEBUG (#861)Michael Grunder
Addresses #642
2020-07-31Use development specific versions in mastermichael-grunder
Avoids issues like #860
2020-07-31We can run SSL tests everywhere except mingw/Windows (#859)Michael Grunder
2020-07-30Remove extra whitespace (#858)Michael Grunder
2020-07-30Keep libev's code style (#857)lijiageng
2020-07-29Update notes preparing for v1.0.0-rc1michael-grunder
2020-07-29Move SSL management to a distinct private pointer. (#855)Michael Grunder
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
2020-07-26Minor refactor for scheduling an async timer. (#854)Michael Grunder
Small change to the logic introduced in #839
2020-07-26add a command_timeout to redisContextOptions (#839)valentinogeron
Add an additional timeout so the user has a convenient way of controlling distinct connect and command timeouts
2020-07-21Fix a static analysis false positivemichael-grunder
Static analyzer's can't tell that hi_calloc is calloc-like, and report a potential null pointer dereference. This isn't possible but it's probably smarter to make the test anyway in the event code changes.
2020-07-20Move include to sockcompat.h to maintain style (#850)Michael Grunder
See #848
2020-07-20fix windows compiling with mingw (#848)Malizia R
2020-07-19Remove erroneous tag and add license to push example (#849)Michael Grunder
2020-07-19Resp3 oob push support (#841)Michael Grunder
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
2020-07-10Some Windows quality of life improvments. (#846)Michael Grunder
* Don't try to ignore SIGPIPE in Windows (it doesn't exist). * Add an include to our win32.h compatibility header. * Enable building examples on Travis in Windows. See #831
2020-07-08Use _WIN32 define instead of WIN32 (#845)Michael Grunder
It appears that _WIN32 is always defined by MSVC whereas WIN32 may not be, depending on configuration.
2020-07-08Non Linux CI fixes (#844)Michael Grunder
* Switch to memurai for Windows tests * Switch to macports from brew.
2020-06-22fix #785: defer TCP_NODELAY in async tcp connections (#836)OmriSteiner
Co-authored-by: Omri Steiner <omri@insoundz.com>
2020-06-18timeout option in redisConnectWithOptions should be on connect only (#829)valentinogeron
When connecting with a timeout, we shouldn't also call `redisSetTimeout` which will implement a timeout for commands. See related issue #722
2020-06-07sdsrange overflow fix (#830)Michael Grunder
Fix overflow bug in `sdsrange`
2020-06-01Use explicit pointer casting for c++ compatibility (#826)Aureus
2020-05-30Merge branch 'new-ssl-api'michael-grunder
2020-05-30Tiny OOM fixmichael-grunder
2020-05-30Merge branch 'master' into new-ssl-apimichael-grunder
2020-05-26Document allocator injection and completeness fix in test.c (#824)Michael Grunder
2020-05-25Use unique names for allocator struct members (#823)Michael Grunder
Using `strdup` as a struct member causes issues in older gcc
2020-05-24New SSL API to replace redisSecureConnection().Yossi Gottlieb
2020-05-22Allow users to replace allocator and handle OOM everywhere. (#800)Michael Grunder
* 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.
2020-05-21Add logic to handle RESP3 push messages (#819)Michael Grunder
Fixes #815
2020-05-20Use standrad isxdigit instead of custom helper function. (#814)Muhammad Zahalqa
Standard function available and on most platforms uses a lookup table and not a check with 3 ranges.
2020-05-19Resp3 verbatim string support (#805)Michael Grunder
Pull RESP3 verbatim string handling from Redis Fixes #802
2020-05-19Fix missing SSL build/install options. (#812)Yossi Gottlieb
* Fix missing SSL build/install options. * Use different build commands for non-Linux linkers. * Add missing install targets. Fixes #809
2020-05-16Add link to ABI tracker (#808)Michael Grunder
Addresses #506
2020-05-04Remove nested depth limitation. (#797)Michael Grunder
* 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
2020-05-04Support timeouts in libev adapater (#795)Michael Grunder
Add support for timeouts in our libev adapter. See #795
2020-04-23Attempt to fix compilation on Solaris (#796)Michael Grunder
See #757
2020-04-23Fix pkgconfig when installing to a custom lib dir (#793)Michael Grunder
* Respect overridden libdir in CMake See: #767
2020-04-13Fix USE_SSL=1 make/cmake on OSX and CMake tests (#789)Michael Grunder
* Fix linker problems when building with SSL enabled on OSX * Corrects `HIREDIS_SSL=ON` to `USE_SSL=ON` so we test building with SSL enabled on travis.
2020-04-09Provides an optional cleanup callback for async data.Nick Rivera
2020-04-09Use correct libuv call on Windows (#784)Michael Grunder
Explicitly call `uv_poll_init_socket` as that has slightly different semantics on Windows (and is identical to `uv_poll_init` on Linux). http://docs.libuv.org/en/v1.x/poll.html#c.uv_poll_init_socket
2020-04-09Added CMake package config and fixed hiredis_ssl on Windows (#783)Michael Grunder
* Add CMake package configuration so hiredis can be more easily included in other projects. * Fixes hiredis_ssl such that it compiles and works in windows Co-authored-by: nrivera <nrivera@blizzard.com> Co-authored-by: Nick <heronr1@gmail.com>
2020-04-07Merge pull request #780 from yossigo/fix/cmake_ssl_so_versionMichael Grunder
CMake: Set hiredis_ssl shared object version.
2020-04-07CMake: Set hiredis_ssl shared object version.Yossi Gottlieb
2020-04-02Win32 tests and timeout fix (#776)Michael Grunder
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.
2020-04-02Const correctnessmichael-grunder
Fixes #778
2020-03-14Add release pattern for automatic CImichael-grunder
2020-03-13Actually define include guardmichael-grunder