mirror of
https://github.com/php/php-src.git
synced 2025-08-16 05:58:45 +02:00
ZTS cleanup.
This commit is contained in:
parent
e8de102cd6
commit
928c260c57
3 changed files with 16 additions and 21 deletions
|
@ -680,14 +680,13 @@ ftp_pasv(ftpbuf_t *ftp, int pasv)
|
|||
/* {{{ ftp_get
|
||||
*/
|
||||
int
|
||||
ftp_get(ftpbuf_t *ftp, php_stream *outstream, const char *path, ftptype_t type, int resumepos)
|
||||
ftp_get(ftpbuf_t *ftp, php_stream *outstream, const char *path, ftptype_t type, int resumepos TSRMLS_DC)
|
||||
{
|
||||
databuf_t *data = NULL;
|
||||
char *ptr;
|
||||
int lastch;
|
||||
size_t rcvd;
|
||||
char arg[11];
|
||||
TSRMLS_FETCH();
|
||||
|
||||
if (ftp == NULL) {
|
||||
return 0;
|
||||
|
@ -767,14 +766,13 @@ bail:
|
|||
/* {{{ ftp_put
|
||||
*/
|
||||
int
|
||||
ftp_put(ftpbuf_t *ftp, const char *path, php_stream *instream, ftptype_t type, int startpos)
|
||||
ftp_put(ftpbuf_t *ftp, const char *path, php_stream *instream, ftptype_t type, int startpos TSRMLS_DC)
|
||||
{
|
||||
databuf_t *data = NULL;
|
||||
int size;
|
||||
char *ptr;
|
||||
int ch;
|
||||
char arg[11];
|
||||
TSRMLS_FETCH();
|
||||
|
||||
if (ftp == NULL) {
|
||||
return 0;
|
||||
|
@ -1652,7 +1650,7 @@ ftp_nb_get(ftpbuf_t *ftp, php_stream *outstream, const char *path, ftptype_t typ
|
|||
ftp->lastch = 0;
|
||||
ftp->nb = 1;
|
||||
|
||||
return (ftp_nb_continue_read(ftp));
|
||||
return (ftp_nb_continue_read(ftp TSRMLS_CC));
|
||||
|
||||
bail:
|
||||
data_close(ftp, data);
|
||||
|
@ -1663,14 +1661,13 @@ bail:
|
|||
/* {{{ ftp_nb_continue_read
|
||||
*/
|
||||
int
|
||||
ftp_nb_continue_read(ftpbuf_t *ftp)
|
||||
ftp_nb_continue_read(ftpbuf_t *ftp TSRMLS_DC)
|
||||
{
|
||||
databuf_t *data = NULL;
|
||||
char *ptr;
|
||||
int lastch;
|
||||
size_t rcvd;
|
||||
ftptype_t type;
|
||||
TSRMLS_FETCH();
|
||||
|
||||
data = ftp->data;
|
||||
|
||||
|
@ -1769,7 +1766,7 @@ ftp_nb_put(ftpbuf_t *ftp, const char *path, php_stream *instream, ftptype_t type
|
|||
ftp->lastch = 0;
|
||||
ftp->nb = 1;
|
||||
|
||||
return (ftp_nb_continue_write(ftp));
|
||||
return (ftp_nb_continue_write(ftp TSRMLS_CC));
|
||||
|
||||
bail:
|
||||
data_close(ftp, data);
|
||||
|
@ -1781,12 +1778,11 @@ bail:
|
|||
/* {{{ ftp_nb_continue_write
|
||||
*/
|
||||
int
|
||||
ftp_nb_continue_write(ftpbuf_t *ftp)
|
||||
ftp_nb_continue_write(ftpbuf_t *ftp TSRMLS_DC)
|
||||
{
|
||||
int size;
|
||||
char *ptr;
|
||||
int ch;
|
||||
TSRMLS_FETCH();
|
||||
|
||||
/* check if we can write more data */
|
||||
if (!data_writeable(ftp, ftp->data->fd)) {
|
||||
|
|
|
@ -156,13 +156,12 @@ int ftp_pasv(ftpbuf_t *ftp, int pasv);
|
|||
/* retrieves a file and saves its contents to outfp
|
||||
* returns true on success, false on error
|
||||
*/
|
||||
int ftp_get(ftpbuf_t *ftp, php_stream *outstream, const char *path,
|
||||
ftptype_t type, int resumepos);
|
||||
int ftp_get(ftpbuf_t *ftp, php_stream *outstream, const char *path, ftptype_t type, int resumepos TSRMLS_DC);
|
||||
|
||||
/* stores the data from a file, socket, or process as a file on the remote server
|
||||
* returns true on success, false on error
|
||||
*/
|
||||
int ftp_put(ftpbuf_t *ftp, const char *path, php_stream *instream, ftptype_t type, int startpos);
|
||||
int ftp_put(ftpbuf_t *ftp, const char *path, php_stream *instream, ftptype_t type, int startpos TSRMLS_DC);
|
||||
|
||||
/* returns the size of the given file, or -1 on error */
|
||||
int ftp_size(ftpbuf_t *ftp, const char *path);
|
||||
|
@ -191,11 +190,11 @@ int ftp_nb_put(ftpbuf_t *ftp, const char *path, php_stream *instream, ftptype_t
|
|||
|
||||
/* continues a previous nb_(f)get command
|
||||
*/
|
||||
int ftp_nb_continue_read(ftpbuf_t *ftp);
|
||||
int ftp_nb_continue_read(ftpbuf_t *ftp TSRMLS_DC);
|
||||
|
||||
/* continues a previous nb_(f)put command
|
||||
*/
|
||||
int ftp_nb_continue_write(ftpbuf_t *ftp);
|
||||
int ftp_nb_continue_write(ftpbuf_t *ftp TSRMLS_DC);
|
||||
|
||||
|
||||
#endif
|
||||
|
|
|
@ -494,7 +494,7 @@ PHP_FUNCTION(ftp_fget)
|
|||
}
|
||||
}
|
||||
|
||||
if (!ftp_get(ftp, stream, file, xtype, resumepos)) {
|
||||
if (!ftp_get(ftp, stream, file, xtype, resumepos TSRMLS_CC)) {
|
||||
php_error_docref(NULL TSRMLS_CC, E_WARNING, "%s", ftp->inbuf);
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
@ -618,7 +618,7 @@ PHP_FUNCTION(ftp_get)
|
|||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
if (!ftp_get(ftp, outstream, remote, xtype, resumepos)) {
|
||||
if (!ftp_get(ftp, outstream, remote, xtype, resumepos TSRMLS_CC)) {
|
||||
php_stream_close(outstream);
|
||||
php_error_docref(NULL TSRMLS_CC, E_WARNING, "%s", ftp->inbuf);
|
||||
RETURN_FALSE;
|
||||
|
@ -713,9 +713,9 @@ PHP_FUNCTION(ftp_nb_continue)
|
|||
}
|
||||
|
||||
if (ftp->direction) {
|
||||
ret=ftp_nb_continue_write(ftp);
|
||||
ret=ftp_nb_continue_write(ftp TSRMLS_CC);
|
||||
} else {
|
||||
ret=ftp_nb_continue_read(ftp);
|
||||
ret=ftp_nb_continue_read(ftp TSRMLS_CC);
|
||||
}
|
||||
|
||||
if (ret != PHP_FTP_MOREDATA && ftp->closestream) {
|
||||
|
@ -767,7 +767,7 @@ PHP_FUNCTION(ftp_fput)
|
|||
}
|
||||
}
|
||||
|
||||
if (!ftp_put(ftp, remote, stream, xtype, startpos)) {
|
||||
if (!ftp_put(ftp, remote, stream, xtype, startpos TSRMLS_CC)) {
|
||||
php_error_docref(NULL TSRMLS_CC, E_WARNING, "%s", ftp->inbuf);
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
@ -869,7 +869,7 @@ PHP_FUNCTION(ftp_put)
|
|||
}
|
||||
}
|
||||
|
||||
if (!ftp_put(ftp, remote, instream, xtype, startpos)) {
|
||||
if (!ftp_put(ftp, remote, instream, xtype, startpos TSRMLS_CC)) {
|
||||
php_stream_close(instream);
|
||||
php_error_docref(NULL TSRMLS_CC, E_WARNING, "%s", ftp->inbuf);
|
||||
RETURN_FALSE;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue