- 29 Aug, 2019 1 commit
-
-
Yossi Gottlieb authored
-
- 09 Aug, 2019 1 commit
-
-
Marcus Geelnard authored
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.
-
- 22 Jul, 2019 1 commit
-
-
Odin Hultgren Van Der Horst authored
- Removed whitespace before newline - Removed win style newline
-
- 13 Apr, 2019 1 commit
-
-
jinjiazhang authored
-
- 11 Mar, 2019 1 commit
-
-
Mark Nunberg authored
This ensures that a disconnect occurs. This commit also ensures that disconnects will clean the socket even if the user is in no-auto-free mode
-
- 21 Feb, 2019 1 commit
-
-
Mark Nunberg authored
-
- 20 Feb, 2019 5 commits
-
-
Mark Nunberg authored
If callback was set before scheduleTimer was set (i..e before one of the attach()) calls.
-
Mark Nunberg authored
-
Mark Nunberg authored
-
Mark Nunberg authored
We changed this to `HIREDIS_SSL`
-
Mark Nunberg authored
-
- 26 Sep, 2018 2 commits
-
-
Mark Nunberg authored
-
Mark Nunberg authored
This retrieves the actual error which occurred, as getsockopt is not always reliable in this regard.
-
- 15 Jun, 2017 1 commit
-
-
amallia authored
-
- 15 May, 2017 1 commit
-
-
Frederik Deweerdt authored
-
- 30 Jan, 2017 2 commits
-
-
Hyungjin Kim authored
-
Hyungjin Kim authored
-
- 29 Sep, 2016 1 commit
-
-
Hyungjin Kim authored
-
- 27 Oct, 2015 1 commit
-
-
charsyam authored
-
- 27 Jul, 2015 1 commit
-
-
Jan-Erik Rediger authored
Fixes #335.
-
- 28 Apr, 2015 1 commit
-
-
antirez authored
When an asynchronous hiredis connection subscribes to a Pub/Sub channel and gets an error, and in other related conditions, the function redisProcessCallbacks() enters a code path where the link is disconnected, however the function returns before freeing the allocated reply object. This causes a memory leak. The memory leak was trivial to trigger in Redis Sentinel, which uses hiredis, every time we tried to subscribe to an instance that required a password, in case the Sentinel was configured either with the wrong password or without password at all. In this case, the -AUTH error caused the leaking code path to be executed.
-
- 05 Jan, 2015 6 commits
-
-
Matt Stancliff authored
Previously, redisvAppendCommand() would return OOM even with formatting errors. Now we use OTHER with an error string telling the user the error was formatting related, not memory related. This also fixes a potentially worse bug where were would pass error result of -1 as an actual length to another function taking an unsigned length, which would result in crash/overallocation/errors. Now for that case, we just return an error immediately and stop processing the command. Fixes #177
-
Matt Stancliff authored
redisAsyncInitialize() can return NULL, but then we pass the return value from redisAsyncInitialize() into something dereferencing the return value, which can cause crashies.
-
mike authored
[This introduces some new API functions.] * Adds new flag to the connection context indicating SO_REUSEADDR should be set. * Adds max number of retries constant for when connect() hits EADDRNOTAVAIL. * Adds new function, redisAsyncConnectBindWithReuse(), letting clients enable this functionality. [Removed trailing whitespace in new header lines.] Closes #264
-
michael-grunder authored
OK, perhaps the second time is a charm. I forgot that I had hiredis forked from a long time ago, so the initial pull request was hosed. :) * Pulled in sdscatfmt() from Redis, and modified it to accept a size_t (%T) style format specifier. * Pulled in sdsll2str() and sdsull2str() from Redis (needed by sdscatfmt). * Added a new method, redisFormatSdsCommandArgv() which takes and sds* as the target, rather than char* (and uses sdscatfmt instead of sprintf for the construction). I get roughly the following improvement: Old: 1.044806 New: 0.481620 The benchmark code itself can be found here: https://gist.github.com/michael-grunder/c92ef31bb632b3d0ad81 Closes #260
-
Hang Su authored
'const' where we can. Closes #268
-
Jan-Erik Rediger authored
If the string is already in the dict, we need to free this. Original fix by @tt33415366. Fixes #256 Closes #286
-
- 10 Apr, 2014 1 commit
-
-
Pieter Noordhuis authored
-
- 08 Apr, 2014 3 commits
-
-
Matt Stancliff authored
Some environments require binding to specific source addresses instead of letting the system determine which IP a connection should originate from. Closes #233
-
Matt Stancliff authored
All the assignments to cb are inside conditionals, so it's vaguely possible it never gets initialized before we try to read from it with (cb.fn == NULL). Condition discovered with scan-build. Closes #229
-
Matt Stancliff authored
With all the async connects and disconnects and error handling going on in hiredis, we need to centralize how we close our fd and set it so it doesn't get re-closed. Prior to this commit, sometimes we'd close(fd), run an async error handler, then call close(fd) again. To stop multiple closes, we now set fd to -1 after we free it, but that requires not passing fd as an independent argument to functions. This commit moves all fd usage to c->fd. Since the context has a fd field and all functions receive the context, it makes more sense to use the fd inside of c instead of passing along fd as an independent argument. Also, by only using c->fd, we can set c->fd after we close it to signify we shouldn't re-close the same fd again. This does change one semi-public interface function redisCheckSocketError() to only take (context) instead of (context, fd). A search on github returned zero occasions of people using redisCheckSocketError() outside of net.{c,h} in hiredis itself. Commit inspired by the bug report at: https://groups.google.com/forum/#!topic/redis-db/mQm46XkIPOY Thanks go out to Thijs for trying high-frequency reconnects on a host that isn't there. Closes #230
-
- 15 Jan, 2014 1 commit
-
-
Charlie Somerville authored
-
- 11 Jul, 2013 1 commit
-
-
Pieter Noordhuis authored
-
- 22 Jan, 2013 2 commits
-
-
Henri Doreau authored
-
Henri Doreau authored
Updated documentation and examples accordingly.
-
- 12 Nov, 2012 1 commit
-
-
Nathan McSween authored
-
- 01 Aug, 2012 1 commit
-
-
Pieter Noordhuis authored
-
- 11 Jul, 2012 1 commit
-
-
Alex Leverington authored
async: support for determining monitor mode, if so, repush replies callback in expectation of another reply.
-
- 11 Jul, 2011 1 commit
-
-
R. Tyler Croy authored
-
- 27 Jun, 2011 1 commit
-
-
Pieter Noordhuis authored
This commit adds a status argument to the connect callback. It will be called in the event of an unsuccessful connection as well, where the status argument is set to REDIS_ERR. It is set to REDIS_OK otherwise.
-