Commit Graph

678 Commits

Author SHA1 Message Date
Mark Nunberg
ea9f9d2515 fixed wrong memset args 2019-02-20 09:11:10 -05:00
Mark Nunberg
f0a7595056 libevent: call destroy from cleanup
also, indentation fix
2019-02-20 09:11:10 -05:00
Mark Nunberg
1eb44cf0c4 scrub redisContext before freeing
This helps us detect use-after-free
2019-02-20 09:11:10 -05:00
Mark Nunberg
f60c5506fe Add EV_PERSIST flag to read events
This will avoid the need to constantly reschedule the event
2019-02-20 09:11:10 -05:00
Mark Nunberg
24e6166fed libevent: fix invalid mem access on delete within callback enter 2019-02-20 09:11:10 -05:00
Mark Nunberg
5f633ac4ec fix potential uninitialized read
If callback was set before scheduleTimer was set (i..e before one of the
attach()) calls.
2019-02-20 09:11:10 -05:00
Mark Nunberg
0bc2356ed5 CMake: update for SSL 2019-02-20 09:11:10 -05:00
valentino
847a20122f Fix memory leaks 2019-02-20 09:10:10 -05:00
valentino
58222c26f4 Support SNI 2019-02-20 09:10:10 -05:00
valentino
389e694abe Fix compilation on Ubuntu 2019-02-20 09:10:10 -05:00
Mark Nunberg
3a547b8ec0 Unix: set addrlen so async reconnect uses proper size 2019-02-20 09:10:10 -05:00
Mark Nunberg
f51363a70c Don't warn on missing field initializers 2019-02-20 09:10:10 -05:00
Mark Nunberg
f4f6b6d65c minor fixes: initialize options struct with 0 always
also, clean up redisContextInit -- we're just zeoring the struct
2019-02-20 09:10:10 -05:00
Mark Nunberg
7b705936f6 libevent-example: Use timeout 2019-02-20 09:10:10 -05:00
Mark Nunberg
53d9b12b76 Fix bug in options macro 2019-02-20 09:10:10 -05:00
Mark Nunberg
deba8d956d Allow connectWithOptions for async as well 2019-02-20 09:10:10 -05:00
Mark Nunberg
35a0a1f369 read/write timeouts 2019-02-20 09:10:10 -05:00
Mark Nunberg
e4a78006e7 Provide option-struct initialization
This reduces the boilerplate of all the redisConnectXXX functions, and
allows us to provide more connection options in the future.
2019-02-20 09:10:10 -05:00
Mark Nunberg
d329cc952a Use SSL by default 2019-02-20 09:10:10 -05:00
Mark Nunberg
4127e4488b Don't add dead code for HIREDIS_NOSSL
We changed this to `HIREDIS_SSL`
2019-02-20 09:10:10 -05:00
Mark Nunberg
bc2a8f372a Minor SSL-related fixes 2019-02-20 09:10:10 -05:00
Mark Nunberg
82549a53de Disable SSL by default 2019-02-20 09:10:10 -05:00
Mark Nunberg
08efa46599 SSL for async I/O 2019-02-20 09:10:10 -05:00
Mark Nunberg
ba947bc93c Add SSL example 2019-02-20 09:10:10 -05:00
Mark Nunberg
5f50eb4131 Remove extra printfs 2019-02-20 09:10:10 -05:00
Mark Nunberg
0c14544906 Initial SSL (sync) implementation 2019-02-20 09:10:10 -05:00
Justin Brewer
4d00404b8f Update appveyor.yml to cmake
Signed-off-by: Justin Brewer <jzb0012@auburn.edu>
2019-02-20 05:01:09 -05:00
Justin Brewer
93261d465f Update .travis-ci.yml to use cmake
Signed-off-by: Justin Brewer <jzb0012@auburn.edu>
2019-02-20 05:01:09 -05:00
Justin Brewer
ebe1657c8f Obey HIREDIS_SONAME for shared library
Signed-off-by: Justin Brewer <jzb0012@auburn.edu>
2019-02-20 05:01:09 -05:00
Justin Brewer
7d38176bdb Call project() with parsed version string
Signed-off-by: Justin Brewer <jzb0012@auburn.edu>
2019-02-20 05:01:09 -05:00
Justin Brewer
58d0e28333 Enable make test
Signed-off-by: Justin Brewer <jzb0012@auburn.edu>
2019-02-20 05:01:09 -05:00
Justin Brewer
9ea7ddec0c Generate and install hiredis.pc
Signed-off-by: Justin Brewer <jzb0012@auburn.edu>
2019-02-20 05:01:09 -05:00
Justin Brewer
edfab35cdc Install async.h
Signed-off-by: Justin Brewer <jzb0012@auburn.edu>
2019-02-20 05:01:08 -05:00
Justin Brewer
0c57a083c7 Add ENABLE_EXAMPLES option, off by default
Signed-off-by: Justin Brewer <jzb0012@auburn.edu>
2019-02-20 05:01:08 -05:00
Mark Nunberg
bbad21f5ca Add examples to CMakeLists 2019-02-20 05:01:08 -05:00
Mark Nunberg
ead586a2cb Add CMake system. Initial commit
This provides a target to build a DSO, as well as the ability to install
it.
2019-02-20 05:01:08 -05:00
Mark Nunberg
c732240152
Merge pull request #644 from codehz/codehz-patch-1
Fix Invalid argument after redisAsyncConnectUnix
2019-01-28 08:57:19 -05:00
Code Hz
be6bb39fda
Fix Invalid argument after redisAsyncConnectUnix 2019-01-28 21:54:42 +08:00
Mark Nunberg
e6e5a2cba6
Merge pull request #632 from Mic92/patch-1
Makefile: use predefined AR
2018-12-05 07:48:28 -05:00
Mark Nunberg
088d1469b3 Fix regression when connecting with Unix sockets (#629) 2018-12-05 07:47:27 -05:00
Mark Nunberg
8633a2f32e Allow connections to unix socket in example
To minimize code changes, a simple `u` (or UNIX, Unix, unix, etc -- as
long as the first character is u or U) is used as a marker for the
'port' argument. In this case, the hostname is interpreted to be the
path to the unix socket.
2018-12-05 07:02:26 -05:00
Jörg Thalheim
2fa34e37af
Makefile: use predefined AR
This allows to override it for cross compilation.
2018-12-04 20:47:37 +00:00
Mark Nunberg
91289c81ee
Merge pull request #624 from yossigo/fix/libuv-errors
Fix errors not propagating properly with libuv.h.
2018-11-30 06:52:39 -05:00
Mark Nunberg
a7516ada53
Merge pull request #628 from devnexen/freebsd_ut_fix
FreeBSD  build fix
2018-11-30 06:50:55 -05:00
David Carlier
d9fe8bdf67 FreeBSD build fix 2018-11-26 16:20:51 +00:00
Yossi Gottlieb
9ce15c4b39 Fix errors not propagating properly with libuv.h. 2018-11-04 10:04:53 +02:00
Michael Grunder
970e5fa0a3
Merge pull request #620 from hacst/patch-1
Fix redisBufferRead documentation
2018-10-25 09:53:50 -07:00
Stefan Hacker
169fcc708b Fix redisBufferRead documentation
Referred to redisContextReadReply which I cannot find in this codebase
nor the old redis-tools one. Presumably this meant to say
redisGetReplyFromReader which is how redisBufferRead is used in this
file. Could've also meant the interface function redisReaderGetReply.
2018-10-24 23:56:51 +02:00
Mark Nunberg
67036ef70c
Merge pull request #578 from mnunberg/connfix
Proper error reporting for connect failures
2018-10-03 06:53:42 -04:00
Mark Nunberg
747d78beaa
Merge pull request #580 from charsyam/feature/fix-realloc
fix common realloc mistake and add null check more
2018-09-27 07:07:00 -04:00