Skip to content

Commit 2bae801

Browse files
yatsukhnenkomichael-grunder
authored andcommittedNov 5, 2019
Issue #1664
In PR #1602 we decided to use unsigned short for storing RedisSock->port but in previous release I reverted that change. In this PR I changed signatire of redis_sock_create to prevent unneccecary convertion of types.
1 parent 6bdcd6d commit 2bae801

File tree

3 files changed

+2
-4
lines changed

3 files changed

+2
-4
lines changed
 

‎README.markdown

-2
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,6 @@ $redis->connect('tls://127.0.0.1'); // enable transport level security, port 637
204204
$redis->connect('127.0.0.1', 6379, 2.5); // 2.5 sec timeout.
205205
$redis->connect('/tmp/redis.sock'); // unix domain socket.
206206
$redis->connect('127.0.0.1', 6379, 1, NULL, 100); // 1 sec timeout, 100ms delay between reconnection attempts.
207-
$redis->connect('unix://redis.sock'); // relative path to unix domain socket requires version 5.0.0 or higher.
208207
~~~
209208

210209
### pconnect, popen
@@ -246,7 +245,6 @@ $redis->pconnect('tls://127.0.0.1'); // enable transport level security, port 63
246245
$redis->pconnect('127.0.0.1', 6379, 2.5); // 2.5 sec timeout and would be another connection than the two before.
247246
$redis->pconnect('127.0.0.1', 6379, 2.5, 'x'); // x is sent as persistent_id and would be another connection than the three before.
248247
$redis->pconnect('/tmp/redis.sock'); // unix domain socket - would be another connection than the four before.
249-
$redis->pconnect('unix://redis.sock'); // relative path to unix domain socket requires version 5.0.0 or higher.
250248
~~~
251249

252250
### auth

‎library.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -1753,7 +1753,7 @@ PHP_REDIS_API void redis_debug_response(INTERNAL_FUNCTION_PARAMETERS, RedisSock
17531753
* redis_sock_create
17541754
*/
17551755
PHP_REDIS_API RedisSock*
1756-
redis_sock_create(char *host, int host_len, unsigned short port,
1756+
redis_sock_create(char *host, int host_len, int port,
17571757
double timeout, double read_timeout,
17581758
int persistent, char *persistent_id,
17591759
long retry_interval)

‎library.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ PHP_REDIS_API void redis_info_response(INTERNAL_FUNCTION_PARAMETERS, RedisSock *
4848
PHP_REDIS_API void redis_parse_info_response(char *response, zval *z_ret);
4949
PHP_REDIS_API void redis_parse_client_list_response(char *response, zval *z_ret);
5050
PHP_REDIS_API void redis_type_response(INTERNAL_FUNCTION_PARAMETERS, RedisSock *redis_sock, zval *z_tab, void *ctx);
51-
PHP_REDIS_API RedisSock* redis_sock_create(char *host, int host_len, unsigned short port, double timeout, double read_timeout, int persistent, char *persistent_id, long retry_interval);
51+
PHP_REDIS_API RedisSock* redis_sock_create(char *host, int host_len, int port, double timeout, double read_timeout, int persistent, char *persistent_id, long retry_interval);
5252
PHP_REDIS_API int redis_sock_connect(RedisSock *redis_sock);
5353
PHP_REDIS_API int redis_sock_server_open(RedisSock *redis_sock);
5454
PHP_REDIS_API int redis_sock_auth(RedisSock *redis_sock);

0 commit comments

Comments
 (0)
Please sign in to comment.