diff options
author | Pieter Noordhuis <pcnoordhuis@gmail.com> | 2010-12-16 23:32:02 +0100 |
---|---|---|
committer | Pieter Noordhuis <pcnoordhuis@gmail.com> | 2010-12-23 11:01:11 +0000 |
commit | a1e97d692e3b9ed3cd6c8751a70665d832199fff (patch) | |
tree | 9ea6957a2c0131f4e75feee38e5bcfdbd2666ff0 /deps/hiredis/net.c | |
parent | d3e5e28804bd3cfd038d95a1ffd85a92941bc788 (diff) | |
download | redis-a1e97d692e3b9ed3cd6c8751a70665d832199fff.tar.gz |
Update hiredis to 0.9.2
Diffstat (limited to 'deps/hiredis/net.c')
-rw-r--r-- | deps/hiredis/net.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/deps/hiredis/net.c b/deps/hiredis/net.c index 599ba9d6b..88171461e 100644 --- a/deps/hiredis/net.c +++ b/deps/hiredis/net.c @@ -1,8 +1,9 @@ /* Extracted from anet.c to work properly with Hiredis error reporting. * * Copyright (c) 2006-2010, Salvatore Sanfilippo <antirez at gmail dot com> - * All rights reserved. + * Copyright (c) 2010, Pieter Noordhuis <pcnoordhuis at gmail dot com> * + * All rights reserved. * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * @@ -43,7 +44,7 @@ #include <stdarg.h> #include <stdio.h> -#include "hiredis.h" +#include "net.h" #include "sds.h" /* Forward declaration */ @@ -114,7 +115,7 @@ int redisContextConnectTcp(redisContext *c, const char *addr, int port) { he = gethostbyname(addr); if (he == NULL) { __redisSetError(c,REDIS_ERR_OTHER, - sdscatprintf(sdsempty(),"can't resolve: %s",addr)); + sdscatprintf(sdsempty(),"Can't resolve: %s",addr)); close(s); return REDIS_ERR; } @@ -137,6 +138,7 @@ int redisContextConnectTcp(redisContext *c, const char *addr, int port) { } c->fd = s; + c->flags |= REDIS_CONNECTED; return REDIS_OK; } @@ -163,5 +165,6 @@ int redisContextConnectUnix(redisContext *c, const char *path) { } c->fd = s; + c->flags |= REDIS_CONNECTED; return REDIS_OK; } |