Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 2633bd8

Browse files
mixiaojiongmichael-grunder
authored andcommitted
bugfix 718
bugfix 718
1 parent 6c67566 commit 2633bd8

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

library.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ redis_sock_read_scan_reply(INTERNAL_FUNCTION_PARAMETERS, RedisSock *redis_sock,
214214
REDIS_SCAN_TYPE type, long *iter)
215215
{
216216
REDIS_REPLY_TYPE reply_type;
217-
int reply_info;
217+
long int reply_info;
218218
char *p_iter;
219219

220220
/* Our response should have two multibulk replies */
@@ -2229,7 +2229,7 @@ redis_sock_gets(RedisSock *redis_sock, char *buf, int buf_size,
22292229

22302230
PHP_REDIS_API int
22312231
redis_read_reply_type(RedisSock *redis_sock, REDIS_REPLY_TYPE *reply_type,
2232-
int *reply_info TSRMLS_DC)
2232+
long int *reply_info TSRMLS_DC)
22332233
{
22342234
// Make sure we haven't lost the connection, even trying to reconnect
22352235
if(-1 == redis_check_eof(redis_sock, 0 TSRMLS_CC)) {
@@ -2257,7 +2257,7 @@ redis_read_reply_type(RedisSock *redis_sock, REDIS_REPLY_TYPE *reply_type,
22572257
}
22582258

22592259
/* Set our size response */
2260-
*reply_info = atoi(inbuf);
2260+
*reply_info = atol(inbuf);
22612261
}
22622262

22632263
/* Success! */
@@ -2320,7 +2320,7 @@ PHP_REDIS_API int
23202320
redis_read_multibulk_recursive(RedisSock *redis_sock, int elements, zval **z_ret
23212321
TSRMLS_DC)
23222322
{
2323-
int reply_info;
2323+
long int reply_info;
23242324
REDIS_REPLY_TYPE reply_type;
23252325
zval *z_subelem;
23262326

@@ -2383,7 +2383,7 @@ redis_read_variant_reply(INTERNAL_FUNCTION_PARAMETERS, RedisSock *redis_sock,
23832383
{
23842384
// Reply type, and reply size vars
23852385
REDIS_REPLY_TYPE reply_type;
2386-
int reply_info;
2386+
long int reply_info;
23872387
//char *bulk_resp;
23882388
zval *z_ret;
23892389

library.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ PHP_REDIS_API int redis_sock_set_err(RedisSock *redis_sock, const char *msg, int
7676
* Variant Read methods, mostly to implement eval
7777
*/
7878

79-
PHP_REDIS_API int redis_read_reply_type(RedisSock *redis_sock, REDIS_REPLY_TYPE *reply_type, int *reply_info TSRMLS_DC);
79+
PHP_REDIS_API int redis_read_reply_type(RedisSock *redis_sock, REDIS_REPLY_TYPE *reply_type, long int *reply_info TSRMLS_DC);
8080
PHP_REDIS_API int redis_read_variant_line(RedisSock *redis_sock, REDIS_REPLY_TYPE reply_type, zval **z_ret TSRMLS_DC);
8181
PHP_REDIS_API int redis_read_variant_bulk(RedisSock *redis_sock, int size, zval **z_ret TSRMLS_DC);
8282
PHP_REDIS_API int redis_read_multibulk_recursive(RedisSock *redis_sock, int elements, zval **z_ret TSRMLS_DC);

0 commit comments

Comments
 (0)