php callback should use INIT_ZVAL to init zval variable
parent
deebe9cc92
commit
0015467136
3
HISTORY
3
HISTORY
|
|
@ -1,9 +1,10 @@
|
||||||
|
|
||||||
Version 5.02 2014-07-04
|
Version 5.02 2014-07-18
|
||||||
* corect README spell mistake
|
* corect README spell mistake
|
||||||
* bug fixed: can't deal sync truncate file exception
|
* bug fixed: can't deal sync truncate file exception
|
||||||
* remove tracker_global.c extern keyword to tracker_global.h
|
* remove tracker_global.c extern keyword to tracker_global.h
|
||||||
* change log level from ERROR to DEBUG when IOEVENT_ERROR
|
* change log level from ERROR to DEBUG when IOEVENT_ERROR
|
||||||
|
* php callback should use INIT_ZVAL to init zval variable
|
||||||
|
|
||||||
Version 5.01 2014-02-02
|
Version 5.01 2014-02-02
|
||||||
* trunk binlog be compressed when trunk init
|
* trunk binlog be compressed when trunk init
|
||||||
|
|
|
||||||
|
|
@ -2858,12 +2858,16 @@ static int php_fdfs_upload_callback(void *arg, const int64_t file_size, int sock
|
||||||
int result;
|
int result;
|
||||||
TSRMLS_FETCH();
|
TSRMLS_FETCH();
|
||||||
|
|
||||||
|
INIT_ZVAL(ret);
|
||||||
ZVAL_NULL(&ret);
|
ZVAL_NULL(&ret);
|
||||||
|
|
||||||
|
INIT_ZVAL(zsock);
|
||||||
ZVAL_LONG(&zsock, sock);
|
ZVAL_LONG(&zsock, sock);
|
||||||
|
|
||||||
pUploadCallback = (php_fdfs_upload_callback_t *)arg;
|
pUploadCallback = (php_fdfs_upload_callback_t *)arg;
|
||||||
if (pUploadCallback->callback.args == NULL)
|
if (pUploadCallback->callback.args == NULL)
|
||||||
{
|
{
|
||||||
|
INIT_ZVAL(null_args);
|
||||||
ZVAL_NULL(&null_args);
|
ZVAL_NULL(&null_args);
|
||||||
pUploadCallback->callback.args = &null_args;
|
pUploadCallback->callback.args = &null_args;
|
||||||
}
|
}
|
||||||
|
|
@ -2907,13 +2911,19 @@ static int php_fdfs_download_callback(void *arg, const int64_t file_size, \
|
||||||
int result;
|
int result;
|
||||||
TSRMLS_FETCH();
|
TSRMLS_FETCH();
|
||||||
|
|
||||||
|
INIT_ZVAL(ret);
|
||||||
ZVAL_NULL(&ret);
|
ZVAL_NULL(&ret);
|
||||||
|
|
||||||
|
INIT_ZVAL(zfilesize);
|
||||||
ZVAL_LONG(&zfilesize, file_size);
|
ZVAL_LONG(&zfilesize, file_size);
|
||||||
|
|
||||||
|
INIT_ZVAL(zdata);
|
||||||
ZVAL_STRINGL(&zdata, (char *)data, current_size, 0);
|
ZVAL_STRINGL(&zdata, (char *)data, current_size, 0);
|
||||||
|
|
||||||
pCallback = (php_fdfs_callback_t *)arg;
|
pCallback = (php_fdfs_callback_t *)arg;
|
||||||
if (pCallback->args == NULL)
|
if (pCallback->args == NULL)
|
||||||
{
|
{
|
||||||
|
INIT_ZVAL(null_args);
|
||||||
ZVAL_NULL(&null_args);
|
ZVAL_NULL(&null_args);
|
||||||
pCallback->args = &null_args;
|
pCallback->args = &null_args;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue