@@ -71,11 +71,11 @@ function_entry php_ftp_functions[] = {
7171 PHP_FE (ftp_close , NULL )
7272 PHP_FE (ftp_set_option , NULL )
7373 PHP_FE (ftp_get_option , NULL )
74- PHP_FE (ftp_async_fget , NULL )
75- PHP_FE (ftp_async_get , NULL )
76- PHP_FE (ftp_async_continue , NULL )
77- PHP_FE (ftp_async_put , NULL )
78- PHP_FE (ftp_async_fput , NULL )
74+ PHP_FE (ftp_nb_fget , NULL )
75+ PHP_FE (ftp_nb_get , NULL )
76+ PHP_FE (ftp_nb_continue , NULL )
77+ PHP_FE (ftp_nb_put , NULL )
78+ PHP_FE (ftp_nb_fput , NULL )
7979 PHP_FALIAS (ftp_quit , ftp_close , NULL )
8080 {NULL , NULL , NULL }
8181};
@@ -460,9 +460,9 @@ PHP_FUNCTION(ftp_fget)
460460}
461461/* }}} */
462462
463- /* {{{ proto bool ftp_async_fget (resource stream, resource fp, string remote_file, int mode[, int resumepos])
463+ /* {{{ proto bool ftp_nb_fget (resource stream, resource fp, string remote_file, int mode[, int resumepos])
464464 Retrieves a file from the FTP server asynchronly and writes it to an open file */
465- PHP_FUNCTION (ftp_async_fget )
465+ PHP_FUNCTION (ftp_nb_fget )
466466{
467467 zval * z_ftp , * z_file ;
468468 ftpbuf_t * ftp ;
@@ -498,7 +498,7 @@ PHP_FUNCTION(ftp_async_fget)
498498 ftp -> direction = 0 ; /* recv */
499499 ftp -> closestream = 0 ; /* do not close */
500500
501- if ((ret = ftp_async_get (ftp , stream , file , xtype , resumepos )) == PHP_FTP_FAILED ) {
501+ if ((ret = ftp_nb_get (ftp , stream , file , xtype , resumepos )) == PHP_FTP_FAILED ) {
502502 php_error_docref (NULL TSRMLS_CC , E_WARNING , "%s" , ftp -> inbuf );
503503 RETURN_LONG (ret );
504504 }
@@ -585,9 +585,9 @@ PHP_FUNCTION(ftp_get)
585585}
586586/* }}} */
587587
588- /* {{{ proto int ftp_async_get (resource stream, string local_file, string remote_file, int mode[, int resume_pos])
589- Retrieves a file from the FTP server asynchronly and writes it to a local file */
590- PHP_FUNCTION (ftp_async_get )
588+ /* {{{ proto int ftp_nb_get (resource stream, string local_file, string remote_file, int mode[, int resume_pos])
589+ Retrieves a file from the FTP server nbhronly and writes it to a local file */
590+ PHP_FUNCTION (ftp_nb_get )
591591{
592592 zval * z_ftp ;
593593 ftpbuf_t * ftp ;
@@ -635,7 +635,7 @@ PHP_FUNCTION(ftp_async_get)
635635 ftp -> direction = 0 ; /* recv */
636636 ftp -> closestream = 1 ; /* do close */
637637
638- if ((ret = ftp_async_get (ftp , outstream , remote , xtype , resumepos )) == PHP_FTP_FAILED ) {
638+ if ((ret = ftp_nb_get (ftp , outstream , remote , xtype , resumepos )) == PHP_FTP_FAILED ) {
639639 php_stream_close (outstream );
640640 php_error_docref (NULL TSRMLS_CC , E_WARNING , "%s" , ftp -> inbuf );
641641 RETURN_LONG (PHP_FTP_FAILED );
@@ -649,9 +649,9 @@ PHP_FUNCTION(ftp_async_get)
649649}
650650/* }}} */
651651
652- /* {{{ proto int ftp_async_continue (resource stream)
653- Continues retrieving/sending a file asyncronously */
654- PHP_FUNCTION (ftp_async_continue )
652+ /* {{{ proto int ftp_nb_continue (resource stream)
653+ Continues retrieving/sending a file nbronously */
654+ PHP_FUNCTION (ftp_nb_continue )
655655{
656656 zval * z_ftp ;
657657 ftpbuf_t * ftp ;
@@ -663,15 +663,15 @@ PHP_FUNCTION(ftp_async_continue)
663663
664664 ZEND_FETCH_RESOURCE (ftp , ftpbuf_t * , & z_ftp , -1 , le_ftpbuf_name , le_ftpbuf );
665665
666- if (!ftp -> async ) {
667- php_error_docref (NULL TSRMLS_CC , E_WARNING , "no asyncronous transfer to continue." );
666+ if (!ftp -> nb ) {
667+ php_error_docref (NULL TSRMLS_CC , E_WARNING , "no nbronous transfer to continue." );
668668 RETURN_LONG (PHP_FTP_FAILED );
669669 }
670670
671671 if (ftp -> direction ) {
672- ret = ftp_async_continue_write (ftp );
672+ ret = ftp_nb_continue_write (ftp );
673673 } else {
674- ret = ftp_async_continue_read (ftp );
674+ ret = ftp_nb_continue_read (ftp );
675675 }
676676
677677 if (ret != PHP_FTP_MOREDATA && ftp -> closestream ) {
@@ -732,9 +732,9 @@ PHP_FUNCTION(ftp_fput)
732732}
733733/* }}} */
734734
735- /* {{{ proto bool ftp_async_fput (resource stream, string remote_file, resource fp, int mode[, int startpos])
736- Stores a file from an open file to the FTP server asyncronly */
737- PHP_FUNCTION (ftp_async_fput )
735+ /* {{{ proto bool ftp_nb_fput (resource stream, string remote_file, resource fp, int mode[, int startpos])
736+ Stores a file from an open file to the FTP server nbronly */
737+ PHP_FUNCTION (ftp_nb_fput )
738738{
739739 zval * z_ftp , * z_file ;
740740 ftpbuf_t * ftp ;
@@ -773,7 +773,7 @@ PHP_FUNCTION(ftp_async_fput)
773773 ftp -> direction = 1 ; /* send */
774774 ftp -> closestream = 0 ; /* do not close */
775775
776- if (((ret = ftp_async_put (ftp , remote , stream , xtype , startpos )) == PHP_FTP_FAILED )) {
776+ if (((ret = ftp_nb_put (ftp , remote , stream , xtype , startpos )) == PHP_FTP_FAILED )) {
777777 php_error_docref (NULL TSRMLS_CC , E_WARNING , "%s" , ftp -> inbuf );
778778 RETURN_LONG (ret );
779779 }
@@ -837,9 +837,9 @@ PHP_FUNCTION(ftp_put)
837837/* }}} */
838838
839839
840- /* {{{ proto bool ftp_async_put (resource stream, string remote_file, string local_file, int mode[, int startpos])
840+ /* {{{ proto bool ftp_nb_put (resource stream, string remote_file, string local_file, int mode[, int startpos])
841841 Stores a file on the FTP server */
842- PHP_FUNCTION (ftp_async_put )
842+ PHP_FUNCTION (ftp_nb_put )
843843{
844844 zval * z_ftp ;
845845 ftpbuf_t * ftp ;
@@ -883,7 +883,7 @@ PHP_FUNCTION(ftp_async_put)
883883 ftp -> direction = 1 ; /* send */
884884 ftp -> closestream = 1 ; /* do close */
885885
886- ret = ftp_async_put (ftp , remote , instream , xtype , startpos );
886+ ret = ftp_nb_put (ftp , remote , instream , xtype , startpos );
887887
888888 if (ret != PHP_FTP_MOREDATA ) {
889889 php_stream_close (instream );
0 commit comments