Age | Commit message (Collapse) | Author |
|
* 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>
|
|
CMake: Set hiredis_ssl shared object version.
|
|
|
|
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.
|
|
Fixes #778
|
|
|
|
|
|
|
|
Housekeeping
* Check for C++ (#758, #750)
* Include `alloc.h` in `make install` and `cmake`
* Add a `.def` file for Windows (#760)
* Include allocation wrappers referenced in adapter headers
* Fix minor syntax errors and typos in README
* Fix CI in Windows by properly escaping arguments (#761)
|
|
install alloc.h
|
|
alloc.h added in # 754
But not added to INSTALL_INCLUDE_PATH
|
|
Create allocation wrappers with a configurable OOM handler (defaults to abort()).
See #752, #747
|
|
fix spelling mistakes
|
|
|
|
Free the reply in redisGetReply when passed NULL
|
|
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
|
|
Adding an option to DISABLE_TESTS
|
|
Fix dead code in sslLogCallback relating to should_log variable.
|
|
Coverity scans found that the should_log logic in sslLogCallback
is not working as expected because the variable is not correctly
initialised (the conditional code before logging always sets the
value to 1, which it already is).
|
|
Fix typo in dict.c.
|
|
|
|
Useful when hiredis is used as a CMake dependency in other projects and
added via add_subdirectory(). With DISABLE_TESTS on, `make test` in the
parent project won't run hiredis tests.
|
|
|
|
Update README with SSL support.
|
|
Fixes leaks in unit tests
|
|
|
|
redisFormatSdsCommandArgv takes an sds* and calls sdsempty() for us.
Addresses #714
|
|
SSL Tests
|
|
This repeats all existing tests in SSL mode, but does not yet provide
SSL-specific tests.
|
|
|
|
We should not attempt to keep the context and re-establish the
TLS connection for several reasons:
1. Maintain symmetry between redisConnect() and redisReconnect(), so in
both cases an extra step is required to initiate SSL.
2. The caller may also wish to reconfigure the SSL session and needs a
chance to do that.
3. It is not a practical thing to do on an async non-blocking connection
context.
|
|
SSL Reorganization
|
|
Also rename the SSL option from `HIREDIS_SSL` to `ENABLE_SSL` to conform
with CMake convnetions.
|
|
|
|
|
|
|
|
|
|
|
|
Fix MSVC build.
|
|
|
|
SSL: Properly report SSL_connect() errors.
|
|
Port RESP3 support from Redis.
|
|
Silent SSL trace to stdout by default.
|
|
|
|
|
|
fix timeout code in windows
|
|
|
|
|
|
|
|
Windows: MinGW fixes and Windows Travis builders
|