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
|
||||
* bug fixed: can't deal sync truncate file exception
|
||||
* remove tracker_global.c extern keyword to tracker_global.h
|
||||
* 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
|
||||
* 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;
|
||||
TSRMLS_FETCH();
|
||||
|
||||
INIT_ZVAL(ret);
|
||||
ZVAL_NULL(&ret);
|
||||
|
||||
INIT_ZVAL(zsock);
|
||||
ZVAL_LONG(&zsock, sock);
|
||||
|
||||
pUploadCallback = (php_fdfs_upload_callback_t *)arg;
|
||||
if (pUploadCallback->callback.args == NULL)
|
||||
{
|
||||
INIT_ZVAL(null_args);
|
||||
ZVAL_NULL(&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;
|
||||
TSRMLS_FETCH();
|
||||
|
||||
INIT_ZVAL(ret);
|
||||
ZVAL_NULL(&ret);
|
||||
|
||||
INIT_ZVAL(zfilesize);
|
||||
ZVAL_LONG(&zfilesize, file_size);
|
||||
|
||||
INIT_ZVAL(zdata);
|
||||
ZVAL_STRINGL(&zdata, (char *)data, current_size, 0);
|
||||
|
||||
pCallback = (php_fdfs_callback_t *)arg;
|
||||
if (pCallback->args == NULL)
|
||||
{
|
||||
INIT_ZVAL(null_args);
|
||||
ZVAL_NULL(&null_args);
|
||||
pCallback->args = &null_args;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue