summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIlia Alshanetsky <iliaa@php.net>2003-01-07 13:02:43 +0000
committerIlia Alshanetsky <iliaa@php.net>2003-01-07 13:02:43 +0000
commit928c260c57d1b8d8d5284ad8bb7f00200f23967a (patch)
tree33e3a06351e4f28912940638cc05af3e5f0764c7
parente8de102cd64da2e2825cb020d42e45680ba397e0 (diff)
downloadphp-git-928c260c57d1b8d8d5284ad8bb7f00200f23967a.tar.gz
ZTS cleanup.
-rw-r--r--ext/ftp/ftp.c16
-rw-r--r--ext/ftp/ftp.h9
-rw-r--r--ext/ftp/php_ftp.c12
3 files changed, 16 insertions, 21 deletions
diff --git a/ext/ftp/ftp.c b/ext/ftp/ftp.c
index 144293b9cd..ef27ed0df2 100644
--- a/ext/ftp/ftp.c
+++ b/ext/ftp/ftp.c
@@ -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)) {
diff --git a/ext/ftp/ftp.h b/ext/ftp/ftp.h
index 43d7e98827..dd6be94c8b 100644
--- a/ext/ftp/ftp.h
+++ b/ext/ftp/ftp.h
@@ -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
diff --git a/ext/ftp/php_ftp.c b/ext/ftp/php_ftp.c
index cf5d5900b1..3b218385fd 100644
--- a/ext/ftp/php_ftp.c
+++ b/ext/ftp/php_ftp.c
@@ -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;