diff options
author | Pavlo Yatsukhnenko <yatsukhnenko@gmail.com> | 2019-01-15 11:07:30 +0300 |
---|---|---|
committer | Pavel Yatsukhnenko <p.yatsukhnenko@digitalscreens.com.ua> | 2019-01-18 00:05:52 +0300 |
commit | c5994f2a42b8a348af92d3acb4edff1328ad8ce1 (patch) | |
tree | b2f4cdc3d7986860ef4bf5e311001820cb57bd2b /library.c | |
parent | e145f8582ab9aa5bb6e986298be2e47d8063c8a0 (diff) |
RedisCluster auth
Diffstat (limited to 'library.c')
-rw-r--r-- | library.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -90,7 +90,9 @@ static int reselect_db(RedisSock *redis_sock TSRMLS_DC) { } /* Helper to resend AUTH <password> in the case of a reconnect */ -static int resend_auth(RedisSock *redis_sock TSRMLS_DC) { +PHP_REDIS_API int +redis_sock_auth(RedisSock *redis_sock TSRMLS_DC) +{ char *cmd, *response; int cmd_len, response_len; @@ -205,7 +207,7 @@ redis_check_eof(RedisSock *redis_sock, int no_throw TSRMLS_DC) errno = 0; if (php_stream_eof(redis_sock->stream) == 0) { /* If we're using a password, attempt a reauthorization */ - if (redis_sock->auth && resend_auth(redis_sock TSRMLS_CC) != 0) { + if (redis_sock->auth && redis_sock_auth(redis_sock TSRMLS_CC) != 0) { errmsg = "AUTH failed while reconnecting"; break; } |