@@ -71,11 +71,11 @@ function_entry php_ftp_functions[] = {
71
71
PHP_FE (ftp_close , NULL )
72
72
PHP_FE (ftp_set_option , NULL )
73
73
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 )
79
79
PHP_FALIAS (ftp_quit , ftp_close , NULL )
80
80
{NULL , NULL , NULL }
81
81
};
@@ -460,9 +460,9 @@ PHP_FUNCTION(ftp_fget)
460
460
}
461
461
/* }}} */
462
462
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])
464
464
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 )
466
466
{
467
467
zval * z_ftp , * z_file ;
468
468
ftpbuf_t * ftp ;
@@ -498,7 +498,7 @@ PHP_FUNCTION(ftp_async_fget)
498
498
ftp -> direction = 0 ; /* recv */
499
499
ftp -> closestream = 0 ; /* do not close */
500
500
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 ) {
502
502
php_error_docref (NULL TSRMLS_CC , E_WARNING , "%s" , ftp -> inbuf );
503
503
RETURN_LONG (ret );
504
504
}
@@ -585,9 +585,9 @@ PHP_FUNCTION(ftp_get)
585
585
}
586
586
/* }}} */
587
587
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 )
591
591
{
592
592
zval * z_ftp ;
593
593
ftpbuf_t * ftp ;
@@ -635,7 +635,7 @@ PHP_FUNCTION(ftp_async_get)
635
635
ftp -> direction = 0 ; /* recv */
636
636
ftp -> closestream = 1 ; /* do close */
637
637
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 ) {
639
639
php_stream_close (outstream );
640
640
php_error_docref (NULL TSRMLS_CC , E_WARNING , "%s" , ftp -> inbuf );
641
641
RETURN_LONG (PHP_FTP_FAILED );
@@ -649,9 +649,9 @@ PHP_FUNCTION(ftp_async_get)
649
649
}
650
650
/* }}} */
651
651
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 )
655
655
{
656
656
zval * z_ftp ;
657
657
ftpbuf_t * ftp ;
@@ -663,15 +663,15 @@ PHP_FUNCTION(ftp_async_continue)
663
663
664
664
ZEND_FETCH_RESOURCE (ftp , ftpbuf_t * , & z_ftp , -1 , le_ftpbuf_name , le_ftpbuf );
665
665
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." );
668
668
RETURN_LONG (PHP_FTP_FAILED );
669
669
}
670
670
671
671
if (ftp -> direction ) {
672
- ret = ftp_async_continue_write (ftp );
672
+ ret = ftp_nb_continue_write (ftp );
673
673
} else {
674
- ret = ftp_async_continue_read (ftp );
674
+ ret = ftp_nb_continue_read (ftp );
675
675
}
676
676
677
677
if (ret != PHP_FTP_MOREDATA && ftp -> closestream ) {
@@ -732,9 +732,9 @@ PHP_FUNCTION(ftp_fput)
732
732
}
733
733
/* }}} */
734
734
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 )
738
738
{
739
739
zval * z_ftp , * z_file ;
740
740
ftpbuf_t * ftp ;
@@ -773,7 +773,7 @@ PHP_FUNCTION(ftp_async_fput)
773
773
ftp -> direction = 1 ; /* send */
774
774
ftp -> closestream = 0 ; /* do not close */
775
775
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 )) {
777
777
php_error_docref (NULL TSRMLS_CC , E_WARNING , "%s" , ftp -> inbuf );
778
778
RETURN_LONG (ret );
779
779
}
@@ -837,9 +837,9 @@ PHP_FUNCTION(ftp_put)
837
837
/* }}} */
838
838
839
839
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])
841
841
Stores a file on the FTP server */
842
- PHP_FUNCTION (ftp_async_put )
842
+ PHP_FUNCTION (ftp_nb_put )
843
843
{
844
844
zval * z_ftp ;
845
845
ftpbuf_t * ftp ;
@@ -883,7 +883,7 @@ PHP_FUNCTION(ftp_async_put)
883
883
ftp -> direction = 1 ; /* send */
884
884
ftp -> closestream = 1 ; /* do close */
885
885
886
- ret = ftp_async_put (ftp , remote , instream , xtype , startpos );
886
+ ret = ftp_nb_put (ftp , remote , instream , xtype , startpos );
887
887
888
888
if (ret != PHP_FTP_MOREDATA ) {
889
889
php_stream_close (instream );
0 commit comments