iliaa Tue Jan 7 08:02:43 2003 EDT Modified files: /php4/ext/ftp ftp.c ftp.h php_ftp.c Log: ZTS cleanup. Index: php4/ext/ftp/ftp.c diff -u php4/ext/ftp/ftp.c:1.72 php4/ext/ftp/ftp.c:1.73 --- php4/ext/ftp/ftp.c:1.72 Mon Jan 6 22:44:12 2003 +++ php4/ext/ftp/ftp.c Tue Jan 7 08:02:43 2003 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: ftp.c,v 1.72 2003/01/07 03:44:12 iliaa Exp $ */ +/* $Id: ftp.c,v 1.73 2003/01/07 13:02:43 iliaa Exp $ */ #include "php.h" @@ -680,14 +680,13 @@ /* {{{ 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 @@ /* {{{ 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->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 @@ /* {{{ 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->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 @@ /* {{{ 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)) { Index: php4/ext/ftp/ftp.h diff -u php4/ext/ftp/ftp.h:1.32 php4/ext/ftp/ftp.h:1.33 --- php4/ext/ftp/ftp.h:1.32 Mon Jan 6 22:44:12 2003 +++ php4/ext/ftp/ftp.h Tue Jan 7 08:02:43 2003 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: ftp.h,v 1.32 2003/01/07 03:44:12 iliaa Exp $ */ +/* $Id: ftp.h,v 1.33 2003/01/07 13:02:43 iliaa Exp $ */ #ifndef FTP_H #define FTP_H @@ -156,13 +156,12 @@ /* 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 @@ /* 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 Index: php4/ext/ftp/php_ftp.c diff -u php4/ext/ftp/php_ftp.c:1.78 php4/ext/ftp/php_ftp.c:1.79 --- php4/ext/ftp/php_ftp.c:1.78 Mon Jan 6 22:44:12 2003 +++ php4/ext/ftp/php_ftp.c Tue Jan 7 08:02:43 2003 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_ftp.c,v 1.78 2003/01/07 03:44:12 iliaa Exp $ */ +/* $Id: php_ftp.c,v 1.79 2003/01/07 13:02:43 iliaa Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -494,7 +494,7 @@ } } - 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 @@ 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 @@ } 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 @@ } } - 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 @@ } } - 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;
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php