mirror of
https://codeberg.org/redict/redict.git
synced 2025-01-22 16:18:28 -05:00
quick and dirty fix for hiredis bug creating problem with the new redis-cli connect commmand. Also change prompt when redis-cli is not connected
This commit is contained in:
parent
efcf948c1a
commit
d8d528e992
1
deps/hiredis/hiredis.c
vendored
1
deps/hiredis/hiredis.c
vendored
@ -664,6 +664,7 @@ void __redisSetError(redisContext *c, int type, const sds errstr) {
|
||||
|
||||
static redisContext *redisContextInit() {
|
||||
redisContext *c = calloc(sizeof(redisContext),1);
|
||||
c->fd = -1; /* quick fix for a bug that should be addressed differently */
|
||||
c->err = 0;
|
||||
c->errstr = NULL;
|
||||
c->obuf = sdsempty();
|
||||
|
@ -412,7 +412,7 @@ static void repl() {
|
||||
sds *argv;
|
||||
|
||||
config.interactive = 1;
|
||||
while((line = linenoise("redis> ")) != NULL) {
|
||||
while((line = linenoise(context ? "redis> " : "not connected> ")) != NULL) {
|
||||
if (line[0] != '\0') {
|
||||
argv = sdssplitargs(line,&argc);
|
||||
linenoiseHistoryAdd(line);
|
||||
|
Loading…
Reference in New Issue
Block a user