Age | Commit message (Collapse) | Author |
|
|
|
|
|
Merge the v1.0.1 release branch and bump the dev version to 1.0.2-dev
|
|
|
|
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>
|
|
|
|
Fixes #867
|
|
|
|
Avoids issues like #860
|
|
|
|
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
|
|
Small change to the logic introduced in #839
|
|
Add an additional timeout so the user has a convenient way of controlling distinct connect and command timeouts
|
|
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
|
|
Fix overflow bug in `sdsrange`
|
|
Pull RESP3 verbatim string handling from Redis
Fixes #802
|
|
|
|
Create allocation wrappers with a configurable OOM handler (defaults to abort()).
See #752, #747
|
|
|
|
|
|
|
|
Port RESP3 support from Redis.
|
|
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.
|
|
This corresponds to commits d5c54f0b..bea09a7f in the redis repository.
|
|
|
|
With this change, Hiredis builds with MinGW and runs on Windows.
|
|
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.
|
|
|
|
|
|
|
|
This reduces the boilerplate of all the redisConnectXXX functions, and
allows us to provide more connection options in the future.
|
|
|
|
This retrieves the actual error which occurred, as getsockopt is not
always reliable in this regard.
|
|
SONAME bumped to 0.14 because we've broken ABI compatibility with 0.13.x
|
|
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>
|
|
|
|
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.
|
|
|
|
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
|
|
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
|
|
|
|
|
|
|
|
|
|
|
|
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.
|
|
|
|
|
|
|
|
Originally implemented by @abedra as part of #306.
In case a write or read times out, we force an error state, because we
can't guarantuee that the next read will get the right data.
Instead we need to reconnect to have a clean-state connection, which is
now easily possible with this method.
|