Commit Graph

852 Commits

Author SHA1 Message Date
michael-grunder
297ecbecb7 Tiny formatting changes + suppress implicit memcpy warning 2020-12-12 11:56:35 -08:00
AdamKorcz
f746a28e71 Removed 2 typecasts 2020-12-12 19:26:04 +00:00
AdamKorcz
940a04f4dd Added fuzzer 2020-12-11 14:03:42 +00:00
Michael Grunder
e4a200040a
Merge pull request #896 from ayeganov/bugfix/ssl_leak
Free SSL object when redisSSLConnect fails
2020-11-15 09:56:10 -08:00
Aleksandr Yeganov
aefef8987f Free SSL object when redisSSLConnect fails 2020-11-10 11:59:41 -05:00
Michael Grunder
e3f88ebcf8
Merge pull request #894 from jcohen02/fix/issue893
Updating SSL connection example in README
2020-10-27 14:20:53 -07:00
Jeremy Cohen
308ffcab8d Updating SSL connection example 2020-10-27 19:40:13 +00:00
Michael Grunder
297f6551da
Merge pull request #889 from redis/wincert
Add support for Wincert CA store in Windows
2020-10-18 14:55:42 -07:00
michael-grunder
e7dda97859 Formatting 2020-10-18 14:24:22 -07:00
Michael Grunder
f44945a0af
Merge pull request #874 from masariello/position-independent-code
Enable position-independent code, and add PDB files to packages for MSVC builds
2020-10-18 14:04:02 -07:00
Michael Grunder
74e78498cf
Merge pull request #888 from michael-grunder/nil-push-invalidation
Fix handling of NIL invalidation messages.
2020-10-18 13:25:45 -07:00
michael-grunder
b9b9f446fe Fix handling of NIL invalidation messages.
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.
2020-10-17 19:08:05 -07:00
Michael Grunder
acc917548d
Merge pull request #885 from gkorland/patch-1
clean a warning, remvoe empty else block
2020-10-12 15:47:14 -07:00
Guy Korland
b086f763e7
clean a warning, remvoe empty else block 2020-10-12 17:15:29 +03:00
Michael Grunder
b47fae4e70
Merge pull request #881 from timgates42/bugfix_typo_terminated
docs: Fix simple typo, termined -> terminated
2020-09-27 21:04:58 -07:00
Tim Gates
f989670e59
docs: Fix simple typo, termined -> terminated
There is a small typo in sds.c.

Should read `terminated` rather than `termined`.
2020-09-26 20:58:09 +10:00
shiyuge
773d6ea8a7
Copy error to redisAsyncContext on timeout 2020-09-23 15:46:20 +08:00
Alessio M
e35300a668 add pdb files to packages for MSVC builds 2020-09-09 18:11:05 +01:00
Alessio M
dde6916b42 Add d suffix to debug libraries so that can packaged together with optimized builds (Release, RelWithDebInfo, etc) 2020-09-09 17:27:28 +01:00
Alessio M
3b68b5018e Enable position-independent code 2020-09-09 11:55:42 +01:00
Alessio M
6693863f4c Add support for system CA certificate store on Windows 2020-09-08 20:09:39 +01:00
michael-grunder
2a5a57b90a Remove whitespace 2020-09-07 17:47:50 -07:00
Alessio M
1b40ec5096 fixed issue with unit test linking on windows with SSL 2020-09-07 23:27:45 +01:00
Alessio M
d7b1d21e80 Merge branch 'master' of github.com:redis/hiredis 2020-09-04 09:31:47 +01:00
Michael Grunder
fb0e6c0dd9
Merge pull request #870 from michael-grunder/cmake-c99
Explicitly set c99 in CMake
2020-08-31 10:29:37 -07:00
michael-grunder
13a35bdb64 Explicitly set c99 in CMake
See #869
2020-08-28 12:35:20 -07:00
Michael Grunder
bea137ca94
Merge pull request #868 from michael-grunder/fix-sockaddr-typo
Fix sockaddr typo
2020-08-20 18:38:16 -07:00
michael-grunder
bd6f86eb6b Fix sockaddr typo
Fixes #867
2020-08-20 17:58:23 -07:00
Michael Grunder
48696e7e5e
Don't use non-installed win32.h helper in examples (#863)
See: #862
2020-08-07 10:26:38 -07:00
michael-grunder
faa1c4863a Merge tag 'v1.0.0'
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-03 12:00:32 -07:00
michael-grunder
d5b4c69b71 Prepare for v1.0.0 GA 2020-08-03 11:18:07 -07:00
Michael Grunder
5003906d63
Define a no op assert if we detect NDEBUG (#861)
Addresses #642
2020-07-31 13:23:28 -07:00
michael-grunder
ea063b7cc8 Use development specific versions in master
Avoids issues like #860
2020-07-31 12:32:40 -07:00
Michael Grunder
04a27f4800
We can run SSL tests everywhere except mingw/Windows (#859) 2020-07-31 09:16:32 -07:00
Michael Grunder
8966a1fc2b
Remove extra whitespace (#858) 2020-07-30 16:55:48 -07:00
lijiageng
34b7f7a0ff
Keep libev's code style (#857) 2020-07-30 10:59:19 -07:00
michael-grunder
a853467542 Update notes preparing for v1.0.0-rc1 2020-07-29 13:39:28 -07:00
Michael Grunder
d8ff72387d
Move SSL management to a distinct private pointer. (#855)
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-29 11:53:03 -07:00
Michael Grunder
be32bcdc8e
Minor refactor for scheduling an async timer. (#854)
Small change to the logic introduced in #839
2020-07-26 13:03:42 -07:00
valentinogeron
38b5ae543f
add a command_timeout to redisContextOptions (#839)
Add an additional timeout so the user has a convenient way of controlling distinct connect and command timeouts
2020-07-26 12:32:27 -07:00
masariello
07c3618ffe Add static library target and cpack support 2020-07-22 20:30:41 +01:00
michael-grunder
3bb985314d Fix a static analysis false positive
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-21 15:39:40 -07:00
Michael Grunder
18fc12c392
Move include to sockcompat.h to maintain style (#850)
See #848
2020-07-20 16:27:28 -07:00
Malizia R
43aeabbbee
fix windows compiling with mingw (#848) 2020-07-20 15:34:52 -07:00
Michael Grunder
5a3c324138
Remove erroneous tag and add license to push example (#849) 2020-07-19 21:47:28 -07:00
Michael Grunder
2e7d7cbabd
Resp3 oob push support (#841)
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-19 18:54:42 -07:00
Michael Grunder
1864e76ea7
Some Windows quality of life improvments. (#846)
* 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-10 12:53:52 -07:00
Michael Grunder
ada3665279
Use _WIN32 define instead of WIN32 (#845)
It appears that _WIN32 is always defined by MSVC whereas WIN32 may not
be, depending on configuration.
2020-07-08 17:44:30 -07:00
Michael Grunder
08593db1f2
Non Linux CI fixes (#844)
* Switch to memurai for Windows tests

* Switch to macports from brew.
2020-07-08 17:06:30 -07:00
OmriSteiner
392de5d7f9
fix #785: defer TCP_NODELAY in async tcp connections (#836)
Co-authored-by: Omri Steiner <omri@insoundz.com>
2020-06-22 13:20:30 -07:00