Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/phpredis/phpredis.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'redis_sentinel.c')
-rw-r--r--redis_sentinel.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/redis_sentinel.c b/redis_sentinel.c
index 55851f10..2d506bd2 100644
--- a/redis_sentinel.c
+++ b/redis_sentinel.c
@@ -47,12 +47,12 @@ PHP_METHOD(RedisSentinel, __construct)
zend_long port = 26379, retry_interval = 0;
redis_sentinel_object *obj;
zend_string *host;
- zval *auth = NULL, *zv = NULL;
+ zval *auth = NULL, *context = NULL, *zv = NULL;
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "S|ldz!ldz",
+ if (zend_parse_parameters(ZEND_NUM_ARGS(), "S|ldz!ldza",
&host, &port, &timeout, &zv,
&retry_interval, &read_timeout,
- &auth) == FAILURE) {
+ &auth, &context) == FAILURE) {
RETURN_FALSE;
}
@@ -92,6 +92,9 @@ PHP_METHOD(RedisSentinel, __construct)
if (auth) {
redis_sock_set_auth_zval(obj->sock, auth);
}
+ if (context) {
+ redis_sock_set_stream_context(obj->sock, context);
+ }
obj->sock->sentinel = 1;
}