summaryrefslogtreecommitdiff
path: root/hiredis.h
AgeCommit message (Collapse)Author
2021-12-22Fix integer overflow when format command larger than 4GB (#1030)sundb
2021-12-22Handle array response in parallell with pubsub using RESP3 (#1014)Bjorn Svensson
RESP3 allows sending commands in parallell with pubsub handling and these commands might get responded with a REDIS_REPLY_ARRAY. This conflicts with the pubsub response handling for RESP2 and results in a faulty state when using RESP3. Add functionality to keep track of PUSH/RESP3 support on the connection and only expect the message type REDIS_REPLY_PUSH as subscribe messages when once seen.
2021-10-07Merge branch 'release/v1.0.2'michael-grunder
2021-10-07Revert erroneous SONAME bumpmichael-grunder
2021-10-04Merge branch 'release/v1.0.1'michael-grunder
Merge the v1.0.1 release branch and bump the dev version to 1.0.2-dev
2021-10-04 Prepare for v1.0.1 GAmichael-grunder
2021-07-11Added REDIS_NO_AUTO_FREE_REPLIES flag (#962)Meir Shpilraien (Spielrein)
When set hiredis will not automatically free replies in an async context, and the replies must be freed instead by the user. Co-authored-by: Michael Grunder <michael.grunder@gmail.com>
2021-02-25read: Add support for the RESP3 bignum typeAlex Smith
2020-08-20Fix sockaddr typomichael-grunder
Fixes #867
2020-08-03Prepare for v1.0.0 GAmichael-grunder
2020-07-31Use development specific versions in mastermichael-grunder
Avoids issues like #860
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-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-06-07sdsrange overflow fix (#830)Michael Grunder
Fix overflow bug in `sdsrange`
2020-05-19Resp3 verbatim string support (#805)Michael Grunder
Pull RESP3 verbatim string handling from Redis Fixes #802
2020-02-28Bump version to 0.15.0michael-grunder
2020-01-28Safe allocation wrappers (#754)Michael Grunder
Create allocation wrappers with a configurable OOM handler (defaults to abort()). See #752, #747
2020-01-01fix spelling mistakesShooterIT
2019-09-01Use a const funcs in redisContext.Yossi Gottlieb
2019-08-29wip: SSL code reorganization, see #705.Yossi Gottlieb
2019-08-27Merge pull request #697 from yossigo/resp3Mark Nunberg
Port RESP3 support from Redis.
2019-08-09MinGW fix: Use _MSC_VER instead of _WIN32 where appropriateMarcus Geelnard
Use _MSC_VER (instead of _WIN32) for things that are specific for Visual Studio. Also remove #include <winsock2.h> from hiredis.h, as it leaks too many symbols and defines into the global namespace, which is undesirable for a public interface header. Anyone who uses the the affected parts of the hiredis API needs to include the appropriate headers anyway in order to declare struct timeval variables.
2019-08-04RESP3 support changes from Redis.Yossi Gottlieb
This corresponds to commits d5c54f0b..bea09a7f in the redis repository.
2019-04-13Fix Compile Error On Windows (Visual Studio)jinjiazhang
2019-04-01Port network layer to Winsockm
With this change, Hiredis builds with MinGW and runs on Windows.
2019-04-01Introduce a redisFD typem
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.
2019-02-21Allow option for async connections to not automatically freeMark Nunberg
2019-02-20Support SNIvalentino
2019-02-20Fix bug in options macroMark Nunberg
2019-02-20Provide option-struct initializationMark Nunberg
This reduces the boilerplate of all the redisConnectXXX functions, and allows us to provide more connection options in the future.
2019-02-20Initial SSL (sync) implementationMark Nunberg
2018-09-25Call connect(2) again for non-blocking connectMark Nunberg
This retrieves the actual error which occurred, as getsockopt is not always reliable in this regard.
2018-09-25Prepare for the 0.14.0 releaseTom Lee
SONAME bumped to 0.14 because we've broken ABI compatibility with 0.13.x
2018-04-30Drop __redis_strerror_rJustin Brewer
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: Justin Brewer <jzb0012@auburn.edu>
2017-03-22suppress gcc complaintIchito Nagata
2016-10-25Remove trailing comma in redisConnectionType enumDonald Whyte
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.
2016-04-20fix: Change string length type to size_tJan-Erik Rediger
2016-04-20Auto merge of #391 - redis:catch-error-buf-overflow, r=badboynot-a-robot
Prevent buffer overflow when formatting the error 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
2015-11-18Prevent buffer overflow when formatting the errorJan-Erik Rediger
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
2015-10-28fixing typoscharsyam
2015-09-16Release version 0.13.3Jan-Erik Rediger
2015-08-25Release version 0.13.2Jan-Erik Rediger
2015-07-27Use stable soname versionJan-Erik Rediger
2015-05-03Release version 0.13.1Jan-Erik Rediger
2015-04-30Renamed redisContext struct member 'unix' to 'unix_sock' to avoid ↵Alex Balashov
encountering defined constant 'unix' in GNU C environment (see commit d8145d79ce715054980938c751067ebaa541573c). 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.
2015-04-16Release version 0.13.0Jan-Erik Rediger
2015-04-16Change copyright date and add copyright holderJan-Erik Rediger