ftp 84 ext/ftp/ftp.c static int ftp_putcmd( ftpbuf_t *ftp, ftp 89 ext/ftp/ftp.c static int my_send(ftpbuf_t *ftp, php_socket_t s, void *buf, size_t len); ftp 90 ext/ftp/ftp.c static int my_recv(ftpbuf_t *ftp, php_socket_t s, void *buf, size_t len); ftp 91 ext/ftp/ftp.c static int my_accept(ftpbuf_t *ftp, php_socket_t s, struct sockaddr *addr, socklen_t *addrlen); ftp 94 ext/ftp/ftp.c static int ftp_readline(ftpbuf_t *ftp); ftp 97 ext/ftp/ftp.c static int ftp_getresp(ftpbuf_t *ftp); ftp 100 ext/ftp/ftp.c static int ftp_type(ftpbuf_t *ftp, ftptype_t type); ftp 103 ext/ftp/ftp.c static databuf_t* ftp_getdata(ftpbuf_t *ftp TSRMLS_DC); ftp 106 ext/ftp/ftp.c static databuf_t* data_accept(databuf_t *data, ftpbuf_t *ftp TSRMLS_DC); ftp 109 ext/ftp/ftp.c static databuf_t* data_close(ftpbuf_t *ftp, databuf_t *data); ftp 112 ext/ftp/ftp.c static char** ftp_genlist(ftpbuf_t *ftp, const char *cmd, const char *path TSRMLS_DC); ftp 126 ext/ftp/ftp.c ftpbuf_t *ftp; ftp 132 ext/ftp/ftp.c ftp = ecalloc(1, sizeof(*ftp)); ftp 137 ext/ftp/ftp.c ftp->fd = php_network_connect_socket_to_host(host, ftp 140 ext/ftp/ftp.c if (ftp->fd == -1) { ftp 145 ext/ftp/ftp.c ftp->timeout_sec = timeout_sec; ftp 146 ext/ftp/ftp.c ftp->nb = 0; ftp 148 ext/ftp/ftp.c size = sizeof(ftp->localaddr); ftp 149 ext/ftp/ftp.c memset(&ftp->localaddr, 0, size); ftp 150 ext/ftp/ftp.c if (getsockname(ftp->fd, (struct sockaddr*) &ftp->localaddr, &size) != 0) { ftp 155 ext/ftp/ftp.c if (!ftp_getresp(ftp) || ftp->resp != 220) { ftp 159 ext/ftp/ftp.c return ftp; ftp 162 ext/ftp/ftp.c if (ftp->fd != -1) { ftp 163 ext/ftp/ftp.c closesocket(ftp->fd); ftp 165 ext/ftp/ftp.c efree(ftp); ftp 173 ext/ftp/ftp.c ftp_close(ftpbuf_t *ftp) ftp 175 ext/ftp/ftp.c if (ftp == NULL) { ftp 178 ext/ftp/ftp.c if (ftp->data) { ftp 179 ext/ftp/ftp.c data_close(ftp, ftp->data); ftp 181 ext/ftp/ftp.c if (ftp->stream && ftp->closestream) { ftp 183 ext/ftp/ftp.c php_stream_close(ftp->stream); ftp 185 ext/ftp/ftp.c if (ftp->fd != -1) { ftp 187 ext/ftp/ftp.c if (ftp->ssl_active) { ftp 188 ext/ftp/ftp.c SSL_shutdown(ftp->ssl_handle); ftp 189 ext/ftp/ftp.c SSL_free(ftp->ssl_handle); ftp 192 ext/ftp/ftp.c closesocket(ftp->fd); ftp 194 ext/ftp/ftp.c ftp_gc(ftp); ftp 195 ext/ftp/ftp.c efree(ftp); ftp 203 ext/ftp/ftp.c ftp_gc(ftpbuf_t *ftp) ftp 205 ext/ftp/ftp.c if (ftp == NULL) { ftp 208 ext/ftp/ftp.c if (ftp->pwd) { ftp 209 ext/ftp/ftp.c efree(ftp->pwd); ftp 210 ext/ftp/ftp.c ftp->pwd = NULL; ftp 212 ext/ftp/ftp.c if (ftp->syst) { ftp 213 ext/ftp/ftp.c efree(ftp->syst); ftp 214 ext/ftp/ftp.c ftp->syst = NULL; ftp 222 ext/ftp/ftp.c ftp_quit(ftpbuf_t *ftp) ftp 224 ext/ftp/ftp.c if (ftp == NULL) { ftp 228 ext/ftp/ftp.c if (!ftp_putcmd(ftp, "QUIT", NULL)) { ftp 231 ext/ftp/ftp.c if (!ftp_getresp(ftp) || ftp->resp != 221) { ftp 235 ext/ftp/ftp.c if (ftp->pwd) { ftp 236 ext/ftp/ftp.c efree(ftp->pwd); ftp 237 ext/ftp/ftp.c ftp->pwd = NULL; ftp 247 ext/ftp/ftp.c ftp_login(ftpbuf_t *ftp, const char *user, const char *pass TSRMLS_DC) ftp 253 ext/ftp/ftp.c if (ftp == NULL) { ftp 258 ext/ftp/ftp.c if (ftp->use_ssl && !ftp->ssl_active) { ftp 259 ext/ftp/ftp.c if (!ftp_putcmd(ftp, "AUTH", "TLS")) { ftp 262 ext/ftp/ftp.c if (!ftp_getresp(ftp)) { ftp 266 ext/ftp/ftp.c if (ftp->resp != 234) { ftp 267 ext/ftp/ftp.c if (!ftp_putcmd(ftp, "AUTH", "SSL")) { ftp 270 ext/ftp/ftp.c if (!ftp_getresp(ftp)) { ftp 274 ext/ftp/ftp.c if (ftp->resp != 334) { ftp 277 ext/ftp/ftp.c ftp->old_ssl = 1; ftp 278 ext/ftp/ftp.c ftp->use_ssl_for_data = 1; ftp 293 ext/ftp/ftp.c ftp->ssl_handle = SSL_new(ctx); ftp 294 ext/ftp/ftp.c if (ftp->ssl_handle == NULL) { ftp 300 ext/ftp/ftp.c SSL_set_fd(ftp->ssl_handle, ftp->fd); ftp 302 ext/ftp/ftp.c if (SSL_connect(ftp->ssl_handle) <= 0) { ftp 304 ext/ftp/ftp.c SSL_shutdown(ftp->ssl_handle); ftp 305 ext/ftp/ftp.c SSL_free(ftp->ssl_handle); ftp 309 ext/ftp/ftp.c ftp->ssl_active = 1; ftp 311 ext/ftp/ftp.c if (!ftp->old_ssl) { ftp 314 ext/ftp/ftp.c if (!ftp_putcmd(ftp, "PBSZ", "0")) { ftp 317 ext/ftp/ftp.c if (!ftp_getresp(ftp)) { ftp 322 ext/ftp/ftp.c if (!ftp_putcmd(ftp, "PROT", "P")) { ftp 325 ext/ftp/ftp.c if (!ftp_getresp(ftp)) { ftp 329 ext/ftp/ftp.c ftp->use_ssl_for_data = (ftp->resp >= 200 && ftp->resp <=299); ftp 334 ext/ftp/ftp.c if (!ftp_putcmd(ftp, "USER", user)) { ftp 337 ext/ftp/ftp.c if (!ftp_getresp(ftp)) { ftp 340 ext/ftp/ftp.c if (ftp->resp == 230) { ftp 343 ext/ftp/ftp.c if (ftp->resp != 331) { ftp 346 ext/ftp/ftp.c if (!ftp_putcmd(ftp, "PASS", pass)) { ftp 349 ext/ftp/ftp.c if (!ftp_getresp(ftp)) { ftp 352 ext/ftp/ftp.c return (ftp->resp == 230); ftp 359 ext/ftp/ftp.c ftp_reinit(ftpbuf_t *ftp) ftp 361 ext/ftp/ftp.c if (ftp == NULL) { ftp 365 ext/ftp/ftp.c ftp_gc(ftp); ftp 367 ext/ftp/ftp.c ftp->nb = 0; ftp 369 ext/ftp/ftp.c if (!ftp_putcmd(ftp, "REIN", NULL)) { ftp 372 ext/ftp/ftp.c if (!ftp_getresp(ftp) || ftp->resp != 220) { ftp 383 ext/ftp/ftp.c ftp_syst(ftpbuf_t *ftp) ftp 387 ext/ftp/ftp.c if (ftp == NULL) { ftp 392 ext/ftp/ftp.c if (ftp->syst) { ftp 393 ext/ftp/ftp.c return ftp->syst; ftp 395 ext/ftp/ftp.c if (!ftp_putcmd(ftp, "SYST", NULL)) { ftp 398 ext/ftp/ftp.c if (!ftp_getresp(ftp) || ftp->resp != 215) { ftp 401 ext/ftp/ftp.c syst = ftp->inbuf; ftp 408 ext/ftp/ftp.c ftp->syst = estrdup(syst); ftp 412 ext/ftp/ftp.c return ftp->syst; ftp 419 ext/ftp/ftp.c ftp_pwd(ftpbuf_t *ftp) ftp 423 ext/ftp/ftp.c if (ftp == NULL) { ftp 428 ext/ftp/ftp.c if (ftp->pwd) { ftp 429 ext/ftp/ftp.c return ftp->pwd; ftp 431 ext/ftp/ftp.c if (!ftp_putcmd(ftp, "PWD", NULL)) { ftp 434 ext/ftp/ftp.c if (!ftp_getresp(ftp) || ftp->resp != 257) { ftp 438 ext/ftp/ftp.c if ((pwd = strchr(ftp->inbuf, '"')) == NULL) { ftp 444 ext/ftp/ftp.c ftp->pwd = estrndup(pwd, end - pwd); ftp 446 ext/ftp/ftp.c return ftp->pwd; ftp 453 ext/ftp/ftp.c ftp_exec(ftpbuf_t *ftp, const char *cmd) ftp 455 ext/ftp/ftp.c if (ftp == NULL) { ftp 458 ext/ftp/ftp.c if (!ftp_putcmd(ftp, "SITE EXEC", cmd)) { ftp 461 ext/ftp/ftp.c if (!ftp_getresp(ftp) || ftp->resp != 200) { ftp 472 ext/ftp/ftp.c ftp_raw(ftpbuf_t *ftp, const char *cmd, zval *return_value) ftp 474 ext/ftp/ftp.c if (ftp == NULL || cmd == NULL) { ftp 477 ext/ftp/ftp.c if (!ftp_putcmd(ftp, cmd, NULL)) { ftp 481 ext/ftp/ftp.c while (ftp_readline(ftp)) { ftp 482 ext/ftp/ftp.c add_next_index_string(return_value, ftp->inbuf, 1); ftp 483 ext/ftp/ftp.c if (isdigit(ftp->inbuf[0]) && isdigit(ftp->inbuf[1]) && isdigit(ftp->inbuf[2]) && ftp->inbuf[3] == ' ') { ftp 493 ext/ftp/ftp.c ftp_chdir(ftpbuf_t *ftp, const char *dir) ftp 495 ext/ftp/ftp.c if (ftp == NULL) { ftp 499 ext/ftp/ftp.c if (ftp->pwd) { ftp 500 ext/ftp/ftp.c efree(ftp->pwd); ftp 501 ext/ftp/ftp.c ftp->pwd = NULL; ftp 504 ext/ftp/ftp.c if (!ftp_putcmd(ftp, "CWD", dir)) { ftp 507 ext/ftp/ftp.c if (!ftp_getresp(ftp) || ftp->resp != 250) { ftp 517 ext/ftp/ftp.c ftp_cdup(ftpbuf_t *ftp) ftp 519 ext/ftp/ftp.c if (ftp == NULL) { ftp 523 ext/ftp/ftp.c if (ftp->pwd) { ftp 524 ext/ftp/ftp.c efree(ftp->pwd); ftp 525 ext/ftp/ftp.c ftp->pwd = NULL; ftp 528 ext/ftp/ftp.c if (!ftp_putcmd(ftp, "CDUP", NULL)) { ftp 531 ext/ftp/ftp.c if (!ftp_getresp(ftp) || ftp->resp != 250) { ftp 541 ext/ftp/ftp.c ftp_mkdir(ftpbuf_t *ftp, const char *dir) ftp 545 ext/ftp/ftp.c if (ftp == NULL) { ftp 548 ext/ftp/ftp.c if (!ftp_putcmd(ftp, "MKD", dir)) { ftp 551 ext/ftp/ftp.c if (!ftp_getresp(ftp) || ftp->resp != 257) { ftp 555 ext/ftp/ftp.c if ((mkd = strchr(ftp->inbuf, '"')) == NULL) { ftp 573 ext/ftp/ftp.c ftp_rmdir(ftpbuf_t *ftp, const char *dir) ftp 575 ext/ftp/ftp.c if (ftp == NULL) { ftp 578 ext/ftp/ftp.c if (!ftp_putcmd(ftp, "RMD", dir)) { ftp 581 ext/ftp/ftp.c if (!ftp_getresp(ftp) || ftp->resp != 250) { ftp 591 ext/ftp/ftp.c ftp_chmod(ftpbuf_t *ftp, const int mode, const char *filename, const int filename_len) ftp 595 ext/ftp/ftp.c if (ftp == NULL || filename_len <= 0) { ftp 601 ext/ftp/ftp.c if (!ftp_putcmd(ftp, "SITE", buffer)) { ftp 608 ext/ftp/ftp.c if (!ftp_getresp(ftp) || ftp->resp != 200) { ftp 619 ext/ftp/ftp.c ftp_alloc(ftpbuf_t *ftp, const long size, char **response) ftp 623 ext/ftp/ftp.c if (ftp == NULL || size <= 0) { ftp 629 ext/ftp/ftp.c if (!ftp_putcmd(ftp, "ALLO", buffer)) { ftp 633 ext/ftp/ftp.c if (!ftp_getresp(ftp)) { ftp 638 ext/ftp/ftp.c *response = estrdup(ftp->inbuf); ftp 641 ext/ftp/ftp.c if (ftp->resp < 200 || ftp->resp >= 300) { ftp 652 ext/ftp/ftp.c ftp_nlist(ftpbuf_t *ftp, const char *path TSRMLS_DC) ftp 654 ext/ftp/ftp.c return ftp_genlist(ftp, "NLST", path TSRMLS_CC); ftp 661 ext/ftp/ftp.c ftp_list(ftpbuf_t *ftp, const char *path, int recursive TSRMLS_DC) ftp 663 ext/ftp/ftp.c return ftp_genlist(ftp, ((recursive) ? "LIST -R" : "LIST"), path TSRMLS_CC); ftp 670 ext/ftp/ftp.c ftp_type(ftpbuf_t *ftp, ftptype_t type) ftp 674 ext/ftp/ftp.c if (ftp == NULL) { ftp 677 ext/ftp/ftp.c if (type == ftp->type) { ftp 687 ext/ftp/ftp.c if (!ftp_putcmd(ftp, "TYPE", typechar)) { ftp 690 ext/ftp/ftp.c if (!ftp_getresp(ftp) || ftp->resp != 200) { ftp 693 ext/ftp/ftp.c ftp->type = type; ftp 702 ext/ftp/ftp.c ftp_pasv(ftpbuf_t *ftp, int pasv) ftp 711 ext/ftp/ftp.c if (ftp == NULL) { ftp 714 ext/ftp/ftp.c if (pasv && ftp->pasv == 2) { ftp 717 ext/ftp/ftp.c ftp->pasv = 0; ftp 721 ext/ftp/ftp.c n = sizeof(ftp->pasvaddr); ftp 722 ext/ftp/ftp.c memset(&ftp->pasvaddr, 0, n); ftp 723 ext/ftp/ftp.c sa = (struct sockaddr *) &ftp->pasvaddr; ftp 725 ext/ftp/ftp.c if (getpeername(ftp->fd, sa, &n) < 0) { ftp 735 ext/ftp/ftp.c if (!ftp_putcmd(ftp, "EPSV", NULL)) { ftp 738 ext/ftp/ftp.c if (!ftp_getresp(ftp)) { ftp 741 ext/ftp/ftp.c if (ftp->resp == 229) { ftp 743 ext/ftp/ftp.c for (ptr = ftp->inbuf; *ptr && *ptr != '('; ptr++); ftp 758 ext/ftp/ftp.c ftp->pasv = 2; ftp 766 ext/ftp/ftp.c if (!ftp_putcmd(ftp, "PASV", NULL)) { ftp 769 ext/ftp/ftp.c if (!ftp_getresp(ftp) || ftp->resp != 227) { ftp 773 ext/ftp/ftp.c for (ptr = ftp->inbuf; *ptr && !isdigit(*ptr); ptr++); ftp 782 ext/ftp/ftp.c if (ftp->usepasvaddress) { ftp 787 ext/ftp/ftp.c ftp->pasv = 2; ftp 796 ext/ftp/ftp.c ftp_get(ftpbuf_t *ftp, php_stream *outstream, const char *path, ftptype_t type, long resumepos TSRMLS_DC) ftp 802 ext/ftp/ftp.c if (ftp == NULL) { ftp 805 ext/ftp/ftp.c if (!ftp_type(ftp, type)) { ftp 809 ext/ftp/ftp.c if ((data = ftp_getdata(ftp TSRMLS_CC)) == NULL) { ftp 813 ext/ftp/ftp.c ftp->data = data; ftp 817 ext/ftp/ftp.c if (!ftp_putcmd(ftp, "REST", arg)) { ftp 820 ext/ftp/ftp.c if (!ftp_getresp(ftp) || (ftp->resp != 350)) { ftp 825 ext/ftp/ftp.c if (!ftp_putcmd(ftp, "RETR", path)) { ftp 828 ext/ftp/ftp.c if (!ftp_getresp(ftp) || (ftp->resp != 150 && ftp->resp != 125)) { ftp 832 ext/ftp/ftp.c if ((data = data_accept(data, ftp TSRMLS_CC)) == NULL) { ftp 836 ext/ftp/ftp.c while ((rcvd = my_recv(ftp, data->fd, data->buf, FTP_BUFSIZE))) { ftp 872 ext/ftp/ftp.c ftp->data = data = data_close(ftp, data); ftp 874 ext/ftp/ftp.c if (!ftp_getresp(ftp) || (ftp->resp != 226 && ftp->resp != 250)) { ftp 880 ext/ftp/ftp.c ftp->data = data_close(ftp, data); ftp 888 ext/ftp/ftp.c ftp_put(ftpbuf_t *ftp, const char *path, php_stream *instream, ftptype_t type, long startpos TSRMLS_DC) ftp 896 ext/ftp/ftp.c if (ftp == NULL) { ftp 899 ext/ftp/ftp.c if (!ftp_type(ftp, type)) { ftp 902 ext/ftp/ftp.c if ((data = ftp_getdata(ftp TSRMLS_CC)) == NULL) { ftp 905 ext/ftp/ftp.c ftp->data = data; ftp 909 ext/ftp/ftp.c if (!ftp_putcmd(ftp, "REST", arg)) { ftp 912 ext/ftp/ftp.c if (!ftp_getresp(ftp) || (ftp->resp != 350)) { ftp 917 ext/ftp/ftp.c if (!ftp_putcmd(ftp, "STOR", path)) { ftp 920 ext/ftp/ftp.c if (!ftp_getresp(ftp) || (ftp->resp != 150 && ftp->resp != 125)) { ftp 923 ext/ftp/ftp.c if ((data = data_accept(data, ftp TSRMLS_CC)) == NULL) { ftp 932 ext/ftp/ftp.c if (my_send(ftp, data->fd, data->buf, size) != size) { ftp 948 ext/ftp/ftp.c if (size && my_send(ftp, data->fd, data->buf, size) != size) { ftp 951 ext/ftp/ftp.c ftp->data = data = data_close(ftp, data); ftp 953 ext/ftp/ftp.c if (!ftp_getresp(ftp) || (ftp->resp != 226 && ftp->resp != 250 && ftp->resp != 200)) { ftp 958 ext/ftp/ftp.c ftp->data = data_close(ftp, data); ftp 966 ext/ftp/ftp.c ftp_size(ftpbuf_t *ftp, const char *path) ftp 968 ext/ftp/ftp.c if (ftp == NULL) { ftp 971 ext/ftp/ftp.c if (!ftp_type(ftp, FTPTYPE_IMAGE)) { ftp 974 ext/ftp/ftp.c if (!ftp_putcmd(ftp, "SIZE", path)) { ftp 977 ext/ftp/ftp.c if (!ftp_getresp(ftp) || ftp->resp != 213) { ftp 980 ext/ftp/ftp.c return atol(ftp->inbuf); ftp 987 ext/ftp/ftp.c ftp_mdtm(ftpbuf_t *ftp, const char *path) ftp 995 ext/ftp/ftp.c if (ftp == NULL) { ftp 998 ext/ftp/ftp.c if (!ftp_putcmd(ftp, "MDTM", path)) { ftp 1001 ext/ftp/ftp.c if (!ftp_getresp(ftp) || ftp->resp != 213) { ftp 1005 ext/ftp/ftp.c for (ptr = ftp->inbuf; *ptr && !isdigit(*ptr); ptr++); ftp 1035 ext/ftp/ftp.c ftp_delete(ftpbuf_t *ftp, const char *path) ftp 1037 ext/ftp/ftp.c if (ftp == NULL) { ftp 1040 ext/ftp/ftp.c if (!ftp_putcmd(ftp, "DELE", path)) { ftp 1043 ext/ftp/ftp.c if (!ftp_getresp(ftp) || ftp->resp != 250) { ftp 1054 ext/ftp/ftp.c ftp_rename(ftpbuf_t *ftp, const char *src, const char *dest) ftp 1056 ext/ftp/ftp.c if (ftp == NULL) { ftp 1059 ext/ftp/ftp.c if (!ftp_putcmd(ftp, "RNFR", src)) { ftp 1062 ext/ftp/ftp.c if (!ftp_getresp(ftp) || ftp->resp != 350) { ftp 1065 ext/ftp/ftp.c if (!ftp_putcmd(ftp, "RNTO", dest)) { ftp 1068 ext/ftp/ftp.c if (!ftp_getresp(ftp) || ftp->resp != 250) { ftp 1078 ext/ftp/ftp.c ftp_site(ftpbuf_t *ftp, const char *cmd) ftp 1080 ext/ftp/ftp.c if (ftp == NULL) { ftp 1083 ext/ftp/ftp.c if (!ftp_putcmd(ftp, "SITE", cmd)) { ftp 1086 ext/ftp/ftp.c if (!ftp_getresp(ftp) || ftp->resp < 200 || ftp->resp >= 300) { ftp 1099 ext/ftp/ftp.c ftp_putcmd(ftpbuf_t *ftp, const char *cmd, const char *args) ftp 1116 ext/ftp/ftp.c size = slprintf(ftp->outbuf, sizeof(ftp->outbuf), "%s %s\r\n", cmd, args); ftp 1122 ext/ftp/ftp.c size = slprintf(ftp->outbuf, sizeof(ftp->outbuf), "%s\r\n", cmd); ftp 1125 ext/ftp/ftp.c data = ftp->outbuf; ftp 1128 ext/ftp/ftp.c ftp->extra = NULL; ftp 1130 ext/ftp/ftp.c if (my_send(ftp, ftp->fd, data, size) != size) { ftp 1140 ext/ftp/ftp.c ftp_readline(ftpbuf_t *ftp) ftp 1148 ext/ftp/ftp.c if (ftp->extra) { ftp 1149 ext/ftp/ftp.c memmove(ftp->inbuf, ftp->extra, ftp->extralen); ftp 1150 ext/ftp/ftp.c rcvd = ftp->extralen; ftp 1153 ext/ftp/ftp.c data = ftp->inbuf; ftp 1160 ext/ftp/ftp.c ftp->extra = eol + 1; ftp 1162 ext/ftp/ftp.c ftp->extra++; ftp 1165 ext/ftp/ftp.c if ((ftp->extralen = --rcvd) == 0) { ftp 1166 ext/ftp/ftp.c ftp->extra = NULL; ftp 1171 ext/ftp/ftp.c ftp->extra = eol + 1; ftp 1172 ext/ftp/ftp.c if ((ftp->extralen = --rcvd) == 0) { ftp 1173 ext/ftp/ftp.c ftp->extra = NULL; ftp 1180 ext/ftp/ftp.c if ((rcvd = my_recv(ftp, ftp->fd, data, size)) < 1) { ftp 1192 ext/ftp/ftp.c ftp_getresp(ftpbuf_t *ftp) ftp 1194 ext/ftp/ftp.c if (ftp == NULL) { ftp 1197 ext/ftp/ftp.c ftp->resp = 0; ftp 1201 ext/ftp/ftp.c if (!ftp_readline(ftp)) { ftp 1206 ext/ftp/ftp.c if (isdigit(ftp->inbuf[0]) && isdigit(ftp->inbuf[1]) && isdigit(ftp->inbuf[2]) && ftp->inbuf[3] == ' ') { ftp 1212 ext/ftp/ftp.c if (!isdigit(ftp->inbuf[0]) || !isdigit(ftp->inbuf[1]) || !isdigit(ftp->inbuf[2])) { ftp 1216 ext/ftp/ftp.c ftp->resp = 100 * (ftp->inbuf[0] - '0') + 10 * (ftp->inbuf[1] - '0') + (ftp->inbuf[2] - '0'); ftp 1218 ext/ftp/ftp.c memmove(ftp->inbuf, ftp->inbuf + 4, FTP_BUFSIZE - 4); ftp 1220 ext/ftp/ftp.c if (ftp->extra) { ftp 1221 ext/ftp/ftp.c ftp->extra -= 4; ftp 1230 ext/ftp/ftp.c my_send(ftpbuf_t *ftp, php_socket_t s, void *buf, size_t len) ftp 1237 ext/ftp/ftp.c n = php_pollfd_for_ms(s, POLLOUT, ftp->timeout_sec * 1000); ftp 1250 ext/ftp/ftp.c if (ftp->use_ssl && ftp->fd == s && ftp->ssl_active) { ftp 1251 ext/ftp/ftp.c sent = SSL_write(ftp->ssl_handle, buf, size); ftp 1252 ext/ftp/ftp.c } else if (ftp->use_ssl && ftp->fd != s && ftp->use_ssl_for_data && ftp->data->ssl_active) { ftp 1253 ext/ftp/ftp.c sent = SSL_write(ftp->data->ssl_handle, buf, size); ftp 1275 ext/ftp/ftp.c my_recv(ftpbuf_t *ftp, php_socket_t s, void *buf, size_t len) ftp 1279 ext/ftp/ftp.c n = php_pollfd_for_ms(s, PHP_POLLREADABLE, ftp->timeout_sec * 1000); ftp 1290 ext/ftp/ftp.c if (ftp->use_ssl && ftp->fd == s && ftp->ssl_active) { ftp 1291 ext/ftp/ftp.c nr_bytes = SSL_read(ftp->ssl_handle, buf, len); ftp 1292 ext/ftp/ftp.c } else if (ftp->use_ssl && ftp->fd != s && ftp->use_ssl_for_data && ftp->data->ssl_active) { ftp 1293 ext/ftp/ftp.c nr_bytes = SSL_read(ftp->data->ssl_handle, buf, len); ftp 1307 ext/ftp/ftp.c data_available(ftpbuf_t *ftp, php_socket_t s) ftp 1327 ext/ftp/ftp.c data_writeable(ftpbuf_t *ftp, php_socket_t s) ftp 1348 ext/ftp/ftp.c my_accept(ftpbuf_t *ftp, php_socket_t s, struct sockaddr *addr, socklen_t *addrlen) ftp 1352 ext/ftp/ftp.c n = php_pollfd_for_ms(s, PHP_POLLREADABLE, ftp->timeout_sec * 1000); ftp 1369 ext/ftp/ftp.c ftp_getdata(ftpbuf_t *ftp TSRMLS_DC) ftp 1382 ext/ftp/ftp.c if (ftp->pasv && !ftp_pasv(ftp, 1)) { ftp 1389 ext/ftp/ftp.c data->type = ftp->type; ftp 1391 ext/ftp/ftp.c sa = (struct sockaddr *) &ftp->localaddr; ftp 1399 ext/ftp/ftp.c if (ftp->pasv) { ftp 1401 ext/ftp/ftp.c ftp->pasv = 1; ftp 1405 ext/ftp/ftp.c size = php_sockaddr_size(&ftp->pasvaddr); ftp 1406 ext/ftp/ftp.c tv.tv_sec = ftp->timeout_sec; ftp 1408 ext/ftp/ftp.c if (php_connect_nonb(fd, (struct sockaddr*) &ftp->pasvaddr, size, &tv) == -1) { ftp 1415 ext/ftp/ftp.c ftp->data = data; ftp 1451 ext/ftp/ftp.c if (!ftp_putcmd(ftp, "EPRT", eprtarg)) { ftp 1455 ext/ftp/ftp.c if (!ftp_getresp(ftp) || ftp->resp != 200) { ftp 1459 ext/ftp/ftp.c ftp->data = data; ftp 1469 ext/ftp/ftp.c if (!ftp_putcmd(ftp, "PORT", arg)) { ftp 1472 ext/ftp/ftp.c if (!ftp_getresp(ftp) || ftp->resp != 200) { ftp 1476 ext/ftp/ftp.c ftp->data = data; ftp 1491 ext/ftp/ftp.c data_accept(databuf_t *data, ftpbuf_t *ftp TSRMLS_DC) ftp 1505 ext/ftp/ftp.c data->fd = my_accept(ftp, data->listener, (struct sockaddr*) &addr, &size); ftp 1518 ext/ftp/ftp.c if (ftp->use_ssl && ftp->use_ssl_for_data) { ftp 1540 ext/ftp/ftp.c if (ftp->old_ssl) { ftp 1541 ext/ftp/ftp.c SSL_copy_session_id(data->ssl_handle, ftp->ssl_handle); ftp 1563 ext/ftp/ftp.c data_close(ftpbuf_t *ftp, databuf_t *data) ftp 1598 ext/ftp/ftp.c if (ftp) { ftp 1599 ext/ftp/ftp.c ftp->data = NULL; ftp 1609 ext/ftp/ftp.c ftp_genlist(ftpbuf_t *ftp, const char *cmd, const char *path TSRMLS_DC) ftp 1627 ext/ftp/ftp.c if (!ftp_type(ftp, FTPTYPE_ASCII)) { ftp 1631 ext/ftp/ftp.c if ((data = ftp_getdata(ftp TSRMLS_CC)) == NULL) { ftp 1634 ext/ftp/ftp.c ftp->data = data; ftp 1636 ext/ftp/ftp.c if (!ftp_putcmd(ftp, cmd, path)) { ftp 1639 ext/ftp/ftp.c if (!ftp_getresp(ftp) || (ftp->resp != 150 && ftp->resp != 125 && ftp->resp != 226)) { ftp 1644 ext/ftp/ftp.c if (ftp->resp == 226) { ftp 1645 ext/ftp/ftp.c ftp->data = data_close(ftp, data); ftp 1651 ext/ftp/ftp.c if ((data = data_accept(data, ftp TSRMLS_CC)) == NULL) { ftp 1657 ext/ftp/ftp.c while ((rcvd = my_recv(ftp, data->fd, data->buf, FTP_BUFSIZE))) { ftp 1673 ext/ftp/ftp.c ftp->data = data_close(ftp, data); ftp 1696 ext/ftp/ftp.c if (!ftp_getresp(ftp) || (ftp->resp != 226 && ftp->resp != 250)) { ftp 1703 ext/ftp/ftp.c ftp->data = data_close(ftp, data); ftp 1714 ext/ftp/ftp.c ftp_nb_get(ftpbuf_t *ftp, php_stream *outstream, const char *path, ftptype_t type, long resumepos TSRMLS_DC) ftp 1719 ext/ftp/ftp.c if (ftp == NULL) { ftp 1723 ext/ftp/ftp.c if (!ftp_type(ftp, type)) { ftp 1727 ext/ftp/ftp.c if ((data = ftp_getdata(ftp TSRMLS_CC)) == NULL) { ftp 1733 ext/ftp/ftp.c if (!ftp_putcmd(ftp, "REST", arg)) { ftp 1736 ext/ftp/ftp.c if (!ftp_getresp(ftp) || (ftp->resp != 350)) { ftp 1741 ext/ftp/ftp.c if (!ftp_putcmd(ftp, "RETR", path)) { ftp 1744 ext/ftp/ftp.c if (!ftp_getresp(ftp) || (ftp->resp != 150 && ftp->resp != 125)) { ftp 1748 ext/ftp/ftp.c if ((data = data_accept(data, ftp TSRMLS_CC)) == NULL) { ftp 1752 ext/ftp/ftp.c ftp->data = data; ftp 1753 ext/ftp/ftp.c ftp->stream = outstream; ftp 1754 ext/ftp/ftp.c ftp->lastch = 0; ftp 1755 ext/ftp/ftp.c ftp->nb = 1; ftp 1757 ext/ftp/ftp.c return (ftp_nb_continue_read(ftp TSRMLS_CC)); ftp 1760 ext/ftp/ftp.c ftp->data = data_close(ftp, data); ftp 1768 ext/ftp/ftp.c ftp_nb_continue_read(ftpbuf_t *ftp TSRMLS_DC) ftp 1776 ext/ftp/ftp.c data = ftp->data; ftp 1779 ext/ftp/ftp.c if (!data_available(ftp, data->fd)) { ftp 1783 ext/ftp/ftp.c type = ftp->type; ftp 1785 ext/ftp/ftp.c lastch = ftp->lastch; ftp 1786 ext/ftp/ftp.c if ((rcvd = my_recv(ftp, data->fd, data->buf, FTP_BUFSIZE))) { ftp 1794 ext/ftp/ftp.c php_stream_putc(ftp->stream, '\r'); ftp 1797 ext/ftp/ftp.c php_stream_putc(ftp->stream, *ptr); ftp 1801 ext/ftp/ftp.c } else if (rcvd != php_stream_write(ftp->stream, data->buf, rcvd)) { ftp 1805 ext/ftp/ftp.c ftp->lastch = lastch; ftp 1810 ext/ftp/ftp.c php_stream_putc(ftp->stream, '\r'); ftp 1813 ext/ftp/ftp.c ftp->data = data = data_close(ftp, data); ftp 1815 ext/ftp/ftp.c if (!ftp_getresp(ftp) || (ftp->resp != 226 && ftp->resp != 250)) { ftp 1819 ext/ftp/ftp.c ftp->nb = 0; ftp 1822 ext/ftp/ftp.c ftp->nb = 0; ftp 1823 ext/ftp/ftp.c ftp->data = data_close(ftp, data); ftp 1831 ext/ftp/ftp.c ftp_nb_put(ftpbuf_t *ftp, const char *path, php_stream *instream, ftptype_t type, long startpos TSRMLS_DC) ftp 1836 ext/ftp/ftp.c if (ftp == NULL) { ftp 1839 ext/ftp/ftp.c if (!ftp_type(ftp, type)) { ftp 1842 ext/ftp/ftp.c if ((data = ftp_getdata(ftp TSRMLS_CC)) == NULL) { ftp 1847 ext/ftp/ftp.c if (!ftp_putcmd(ftp, "REST", arg)) { ftp 1850 ext/ftp/ftp.c if (!ftp_getresp(ftp) || (ftp->resp != 350)) { ftp 1855 ext/ftp/ftp.c if (!ftp_putcmd(ftp, "STOR", path)) { ftp 1858 ext/ftp/ftp.c if (!ftp_getresp(ftp) || (ftp->resp != 150 && ftp->resp != 125)) { ftp 1861 ext/ftp/ftp.c if ((data = data_accept(data, ftp TSRMLS_CC)) == NULL) { ftp 1864 ext/ftp/ftp.c ftp->data = data; ftp 1865 ext/ftp/ftp.c ftp->stream = instream; ftp 1866 ext/ftp/ftp.c ftp->lastch = 0; ftp 1867 ext/ftp/ftp.c ftp->nb = 1; ftp 1869 ext/ftp/ftp.c return (ftp_nb_continue_write(ftp TSRMLS_CC)); ftp 1872 ext/ftp/ftp.c ftp->data = data_close(ftp, data); ftp 1881 ext/ftp/ftp.c ftp_nb_continue_write(ftpbuf_t *ftp TSRMLS_DC) ftp 1888 ext/ftp/ftp.c if (!data_writeable(ftp, ftp->data->fd)) { ftp 1893 ext/ftp/ftp.c ptr = ftp->data->buf; ftp 1894 ext/ftp/ftp.c while (!php_stream_eof(ftp->stream) && (ch = php_stream_getc(ftp->stream)) != EOF) { ftp 1896 ext/ftp/ftp.c if (ch == '\n' && ftp->type == FTPTYPE_ASCII) { ftp 1906 ext/ftp/ftp.c if (my_send(ftp, ftp->data->fd, ftp->data->buf, size) != size) { ftp 1913 ext/ftp/ftp.c if (size && my_send(ftp, ftp->data->fd, ftp->data->buf, size) != size) { ftp 1916 ext/ftp/ftp.c ftp->data = data_close(ftp, ftp->data); ftp 1918 ext/ftp/ftp.c if (!ftp_getresp(ftp) || (ftp->resp != 226 && ftp->resp != 250)) { ftp 1921 ext/ftp/ftp.c ftp->nb = 0; ftp 1924 ext/ftp/ftp.c ftp->data = data_close(ftp, ftp->data); ftp 1925 ext/ftp/ftp.c ftp->nb = 0; ftp 103 ext/ftp/ftp.h int ftp_quit(ftpbuf_t *ftp); ftp 106 ext/ftp/ftp.h void ftp_gc(ftpbuf_t *ftp); ftp 109 ext/ftp/ftp.h ftpbuf_t* ftp_close(ftpbuf_t *ftp); ftp 112 ext/ftp/ftp.h int ftp_login(ftpbuf_t *ftp, const char *user, const char *pass TSRMLS_DC); ftp 115 ext/ftp/ftp.h int ftp_reinit(ftpbuf_t *ftp); ftp 118 ext/ftp/ftp.h const char* ftp_syst(ftpbuf_t *ftp); ftp 121 ext/ftp/ftp.h const char* ftp_pwd(ftpbuf_t *ftp); ftp 124 ext/ftp/ftp.h int ftp_exec(ftpbuf_t *ftp, const char *cmd); ftp 127 ext/ftp/ftp.h void ftp_raw(ftpbuf_t *ftp, const char *cmd, zval *return_value); ftp 130 ext/ftp/ftp.h int ftp_chdir(ftpbuf_t *ftp, const char *dir); ftp 133 ext/ftp/ftp.h int ftp_cdup(ftpbuf_t *ftp); ftp 138 ext/ftp/ftp.h char* ftp_mkdir(ftpbuf_t *ftp, const char *dir); ftp 141 ext/ftp/ftp.h int ftp_rmdir(ftpbuf_t *ftp, const char *dir); ftp 144 ext/ftp/ftp.h int ftp_chmod(ftpbuf_t *ftp, const int mode, const char *filename, const int filename_len); ftp 151 ext/ftp/ftp.h int ftp_alloc(ftpbuf_t *ftp, const long size, char **response); ftp 157 ext/ftp/ftp.h char** ftp_nlist(ftpbuf_t *ftp, const char *path TSRMLS_DC); ftp 164 ext/ftp/ftp.h char** ftp_list(ftpbuf_t *ftp, const char *path, int recursive TSRMLS_DC); ftp 169 ext/ftp/ftp.h int ftp_pasv(ftpbuf_t *ftp, int pasv); ftp 174 ext/ftp/ftp.h int ftp_get(ftpbuf_t *ftp, php_stream *outstream, const char *path, ftptype_t type, long resumepos TSRMLS_DC); ftp 179 ext/ftp/ftp.h int ftp_put(ftpbuf_t *ftp, const char *path, php_stream *instream, ftptype_t type, long startpos TSRMLS_DC); ftp 182 ext/ftp/ftp.h long ftp_size(ftpbuf_t *ftp, const char *path); ftp 185 ext/ftp/ftp.h time_t ftp_mdtm(ftpbuf_t *ftp, const char *path); ftp 188 ext/ftp/ftp.h int ftp_rename(ftpbuf_t *ftp, const char *src, const char *dest); ftp 191 ext/ftp/ftp.h int ftp_delete(ftpbuf_t *ftp, const char *path); ftp 194 ext/ftp/ftp.h int ftp_site(ftpbuf_t *ftp, const char *cmd); ftp 199 ext/ftp/ftp.h int ftp_nb_get(ftpbuf_t *ftp, php_stream *outstream, const char *path, ftptype_t type, long resumepos TSRMLS_DC); ftp 204 ext/ftp/ftp.h int ftp_nb_put(ftpbuf_t *ftp, const char *path, php_stream *instream, ftptype_t type, long startpos TSRMLS_DC); ftp 208 ext/ftp/ftp.h int ftp_nb_continue_read(ftpbuf_t *ftp TSRMLS_DC); ftp 212 ext/ftp/ftp.h int ftp_nb_continue_write(ftpbuf_t *ftp TSRMLS_DC); ftp 63 ext/ftp/php_ftp.c ZEND_ARG_INFO(0, ftp) ftp 69 ext/ftp/php_ftp.c ZEND_ARG_INFO(0, ftp) ftp 73 ext/ftp/php_ftp.c ZEND_ARG_INFO(0, ftp) ftp 77 ext/ftp/php_ftp.c ZEND_ARG_INFO(0, ftp) ftp 82 ext/ftp/php_ftp.c ZEND_ARG_INFO(0, ftp) ftp 87 ext/ftp/php_ftp.c ZEND_ARG_INFO(0, ftp) ftp 92 ext/ftp/php_ftp.c ZEND_ARG_INFO(0, ftp) ftp 97 ext/ftp/php_ftp.c ZEND_ARG_INFO(0, ftp) ftp 102 ext/ftp/php_ftp.c ZEND_ARG_INFO(0, ftp) ftp 108 ext/ftp/php_ftp.c ZEND_ARG_INFO(0, ftp) ftp 114 ext/ftp/php_ftp.c ZEND_ARG_INFO(0, ftp) ftp 119 ext/ftp/php_ftp.c ZEND_ARG_INFO(0, ftp) ftp 125 ext/ftp/php_ftp.c ZEND_ARG_INFO(0, ftp) ftp 129 ext/ftp/php_ftp.c ZEND_ARG_INFO(0, ftp) ftp 137 ext/ftp/php_ftp.c ZEND_ARG_INFO(0, ftp) ftp 145 ext/ftp/php_ftp.c ZEND_ARG_INFO(0, ftp) ftp 150 ext/ftp/php_ftp.c ZEND_ARG_INFO(0, ftp) ftp 158 ext/ftp/php_ftp.c ZEND_ARG_INFO(0, ftp) ftp 166 ext/ftp/php_ftp.c ZEND_ARG_INFO(0, ftp) ftp 170 ext/ftp/php_ftp.c ZEND_ARG_INFO(0, ftp) ftp 178 ext/ftp/php_ftp.c ZEND_ARG_INFO(0, ftp) ftp 186 ext/ftp/php_ftp.c ZEND_ARG_INFO(0, ftp) ftp 194 ext/ftp/php_ftp.c ZEND_ARG_INFO(0, ftp) ftp 202 ext/ftp/php_ftp.c ZEND_ARG_INFO(0, ftp) ftp 207 ext/ftp/php_ftp.c ZEND_ARG_INFO(0, ftp) ftp 212 ext/ftp/php_ftp.c ZEND_ARG_INFO(0, ftp) ftp 218 ext/ftp/php_ftp.c ZEND_ARG_INFO(0, ftp) ftp 223 ext/ftp/php_ftp.c ZEND_ARG_INFO(0, ftp) ftp 228 ext/ftp/php_ftp.c ZEND_ARG_INFO(0, ftp) ftp 232 ext/ftp/php_ftp.c ZEND_ARG_INFO(0, ftp) ftp 238 ext/ftp/php_ftp.c ZEND_ARG_INFO(0, ftp) ftp 288 ext/ftp/php_ftp.c PHP_MINIT(ftp), ftp 292 ext/ftp/php_ftp.c PHP_MINFO(ftp), ftp 303 ext/ftp/php_ftp.c ftpbuf_t *ftp = (ftpbuf_t *)rsrc->ptr; ftp 305 ext/ftp/php_ftp.c ftp_close(ftp); ftp 308 ext/ftp/php_ftp.c PHP_MINIT_FUNCTION(ftp) ftp 325 ext/ftp/php_ftp.c PHP_MINFO_FUNCTION(ftp) ftp 345 ext/ftp/php_ftp.c ftpbuf_t *ftp; ftp 361 ext/ftp/php_ftp.c if (!(ftp = ftp_open(host, (short)port, timeout_sec TSRMLS_CC))) { ftp 366 ext/ftp/php_ftp.c ftp->autoseek = FTP_DEFAULT_AUTOSEEK; ftp 367 ext/ftp/php_ftp.c ftp->usepasvaddress = FTP_DEFAULT_USEPASVADDRESS; ftp 370 ext/ftp/php_ftp.c ftp->use_ssl = 0; ftp 373 ext/ftp/php_ftp.c ZEND_REGISTER_RESOURCE(return_value, ftp, le_ftpbuf); ftp 382 ext/ftp/php_ftp.c ftpbuf_t *ftp; ftp 398 ext/ftp/php_ftp.c if (!(ftp = ftp_open(host, (short)port, timeout_sec TSRMLS_CC))) { ftp 403 ext/ftp/php_ftp.c ftp->autoseek = FTP_DEFAULT_AUTOSEEK; ftp 404 ext/ftp/php_ftp.c ftp->usepasvaddress = FTP_DEFAULT_USEPASVADDRESS; ftp 406 ext/ftp/php_ftp.c ftp->use_ssl = 1; ftp 408 ext/ftp/php_ftp.c ZEND_REGISTER_RESOURCE(return_value, ftp, le_ftpbuf); ftp 418 ext/ftp/php_ftp.c ftpbuf_t *ftp; ftp 426 ext/ftp/php_ftp.c ZEND_FETCH_RESOURCE(ftp, ftpbuf_t*, &z_ftp, -1, le_ftpbuf_name, le_ftpbuf); ftp 429 ext/ftp/php_ftp.c if (!ftp_login(ftp, user, pass TSRMLS_CC)) { ftp 430 ext/ftp/php_ftp.c php_error_docref(NULL TSRMLS_CC, E_WARNING, "%s", ftp->inbuf); ftp 443 ext/ftp/php_ftp.c ftpbuf_t *ftp; ftp 450 ext/ftp/php_ftp.c ZEND_FETCH_RESOURCE(ftp, ftpbuf_t*, &z_ftp, -1, le_ftpbuf_name, le_ftpbuf); ftp 452 ext/ftp/php_ftp.c if (!(pwd = ftp_pwd(ftp))) { ftp 453 ext/ftp/php_ftp.c php_error_docref(NULL TSRMLS_CC, E_WARNING, "%s", ftp->inbuf); ftp 466 ext/ftp/php_ftp.c ftpbuf_t *ftp; ftp 472 ext/ftp/php_ftp.c ZEND_FETCH_RESOURCE(ftp, ftpbuf_t*, &z_ftp, -1, le_ftpbuf_name, le_ftpbuf); ftp 474 ext/ftp/php_ftp.c if (!ftp_cdup(ftp)) { ftp 475 ext/ftp/php_ftp.c php_error_docref(NULL TSRMLS_CC, E_WARNING, "%s", ftp->inbuf); ftp 488 ext/ftp/php_ftp.c ftpbuf_t *ftp; ftp 496 ext/ftp/php_ftp.c ZEND_FETCH_RESOURCE(ftp, ftpbuf_t*, &z_ftp, -1, le_ftpbuf_name, le_ftpbuf); ftp 499 ext/ftp/php_ftp.c if (!ftp_chdir(ftp, dir)) { ftp 500 ext/ftp/php_ftp.c php_error_docref(NULL TSRMLS_CC, E_WARNING, "%s", ftp->inbuf); ftp 513 ext/ftp/php_ftp.c ftpbuf_t *ftp; ftp 521 ext/ftp/php_ftp.c ZEND_FETCH_RESOURCE(ftp, ftpbuf_t*, &z_ftp, -1, le_ftpbuf_name, le_ftpbuf); ftp 524 ext/ftp/php_ftp.c if (!ftp_exec(ftp, cmd)) { ftp 525 ext/ftp/php_ftp.c php_error_docref(NULL TSRMLS_CC, E_WARNING, "%s", ftp->inbuf); ftp 538 ext/ftp/php_ftp.c ftpbuf_t *ftp; ftp 546 ext/ftp/php_ftp.c ZEND_FETCH_RESOURCE(ftp, ftpbuf_t*, &z_ftp, -1, le_ftpbuf_name, le_ftpbuf); ftp 549 ext/ftp/php_ftp.c ftp_raw(ftp, cmd, return_value); ftp 558 ext/ftp/php_ftp.c ftpbuf_t *ftp; ftp 566 ext/ftp/php_ftp.c ZEND_FETCH_RESOURCE(ftp, ftpbuf_t*, &z_ftp, -1, le_ftpbuf_name, le_ftpbuf); ftp 569 ext/ftp/php_ftp.c if (NULL == (tmp = ftp_mkdir(ftp, dir))) { ftp 570 ext/ftp/php_ftp.c php_error_docref(NULL TSRMLS_CC, E_WARNING, "%s", ftp->inbuf); ftp 583 ext/ftp/php_ftp.c ftpbuf_t *ftp; ftp 591 ext/ftp/php_ftp.c ZEND_FETCH_RESOURCE(ftp, ftpbuf_t*, &z_ftp, -1, le_ftpbuf_name, le_ftpbuf); ftp 594 ext/ftp/php_ftp.c if (!ftp_rmdir(ftp, dir)) { ftp 595 ext/ftp/php_ftp.c php_error_docref(NULL TSRMLS_CC, E_WARNING, "%s", ftp->inbuf); ftp 608 ext/ftp/php_ftp.c ftpbuf_t *ftp; ftp 617 ext/ftp/php_ftp.c ZEND_FETCH_RESOURCE(ftp, ftpbuf_t*, &z_ftp, -1, le_ftpbuf_name, le_ftpbuf); ftp 619 ext/ftp/php_ftp.c if (!ftp_chmod(ftp, mode, filename, filename_len)) { ftp 620 ext/ftp/php_ftp.c php_error_docref(NULL TSRMLS_CC, E_WARNING, "%s", ftp->inbuf); ftp 633 ext/ftp/php_ftp.c ftpbuf_t *ftp; ftp 641 ext/ftp/php_ftp.c ZEND_FETCH_RESOURCE(ftp, ftpbuf_t*, &z_ftp, -1, le_ftpbuf_name, le_ftpbuf); ftp 643 ext/ftp/php_ftp.c ret = ftp_alloc(ftp, size, zresponse ? &response : NULL); ftp 662 ext/ftp/php_ftp.c ftpbuf_t *ftp; ftp 670 ext/ftp/php_ftp.c ZEND_FETCH_RESOURCE(ftp, ftpbuf_t*, &z_ftp, -1, le_ftpbuf_name, le_ftpbuf); ftp 673 ext/ftp/php_ftp.c if (NULL == (nlist = ftp_nlist(ftp, dir TSRMLS_CC))) { ftp 690 ext/ftp/php_ftp.c ftpbuf_t *ftp; ftp 699 ext/ftp/php_ftp.c ZEND_FETCH_RESOURCE(ftp, ftpbuf_t*, &z_ftp, -1, le_ftpbuf_name, le_ftpbuf); ftp 702 ext/ftp/php_ftp.c if (NULL == (llist = ftp_list(ftp, dir, recursive TSRMLS_CC))) { ftp 719 ext/ftp/php_ftp.c ftpbuf_t *ftp; ftp 726 ext/ftp/php_ftp.c ZEND_FETCH_RESOURCE(ftp, ftpbuf_t*, &z_ftp, -1, le_ftpbuf_name, le_ftpbuf); ftp 728 ext/ftp/php_ftp.c if (NULL == (syst = ftp_syst(ftp))) { ftp 729 ext/ftp/php_ftp.c php_error_docref(NULL TSRMLS_CC, E_WARNING, "%s", ftp->inbuf); ftp 742 ext/ftp/php_ftp.c ftpbuf_t *ftp; ftp 753 ext/ftp/php_ftp.c ZEND_FETCH_RESOURCE(ftp, ftpbuf_t*, &z_ftp, -1, le_ftpbuf_name, le_ftpbuf); ftp 758 ext/ftp/php_ftp.c if (!ftp->autoseek && resumepos == PHP_FTP_AUTORESUME) { ftp 762 ext/ftp/php_ftp.c if (ftp->autoseek && resumepos) { ftp 772 ext/ftp/php_ftp.c if (!ftp_get(ftp, stream, file, xtype, resumepos TSRMLS_CC)) { ftp 773 ext/ftp/php_ftp.c php_error_docref(NULL TSRMLS_CC, E_WARNING, "%s", ftp->inbuf); ftp 786 ext/ftp/php_ftp.c ftpbuf_t *ftp; ftp 797 ext/ftp/php_ftp.c ZEND_FETCH_RESOURCE(ftp, ftpbuf_t*, &z_ftp, -1, le_ftpbuf_name, le_ftpbuf); ftp 802 ext/ftp/php_ftp.c if (!ftp->autoseek && resumepos == PHP_FTP_AUTORESUME) { ftp 806 ext/ftp/php_ftp.c if (ftp->autoseek && resumepos) { ftp 817 ext/ftp/php_ftp.c ftp->direction = 0; /* recv */ ftp 818 ext/ftp/php_ftp.c ftp->closestream = 0; /* do not close */ ftp 820 ext/ftp/php_ftp.c if ((ret = ftp_nb_get(ftp, stream, file, xtype, resumepos TSRMLS_CC)) == PHP_FTP_FAILED) { ftp 821 ext/ftp/php_ftp.c php_error_docref(NULL TSRMLS_CC, E_WARNING, "%s", ftp->inbuf); ftp 834 ext/ftp/php_ftp.c ftpbuf_t *ftp; ftp 841 ext/ftp/php_ftp.c ZEND_FETCH_RESOURCE(ftp, ftpbuf_t*, &z_ftp, -1, le_ftpbuf_name, le_ftpbuf); ftp 843 ext/ftp/php_ftp.c if (!ftp_pasv(ftp, pasv ? 1 : 0)) { ftp 856 ext/ftp/php_ftp.c ftpbuf_t *ftp; ftp 867 ext/ftp/php_ftp.c ZEND_FETCH_RESOURCE(ftp, ftpbuf_t*, &z_ftp, -1, le_ftpbuf_name, le_ftpbuf); ftp 871 ext/ftp/php_ftp.c if (!ftp->autoseek && resumepos == PHP_FTP_AUTORESUME) { ftp 879 ext/ftp/php_ftp.c if (ftp->autoseek && resumepos) { ftp 902 ext/ftp/php_ftp.c if (!ftp_get(ftp, outstream, remote, xtype, resumepos TSRMLS_CC)) { ftp 905 ext/ftp/php_ftp.c php_error_docref(NULL TSRMLS_CC, E_WARNING, "%s", ftp->inbuf); ftp 919 ext/ftp/php_ftp.c ftpbuf_t *ftp; ftp 930 ext/ftp/php_ftp.c ZEND_FETCH_RESOURCE(ftp, ftpbuf_t*, &z_ftp, -1, le_ftpbuf_name, le_ftpbuf); ftp 934 ext/ftp/php_ftp.c if (!ftp->autoseek && resumepos == PHP_FTP_AUTORESUME) { ftp 940 ext/ftp/php_ftp.c if (ftp->autoseek && resumepos) { ftp 964 ext/ftp/php_ftp.c ftp->direction = 0; /* recv */ ftp 965 ext/ftp/php_ftp.c ftp->closestream = 1; /* do close */ ftp 967 ext/ftp/php_ftp.c if ((ret = ftp_nb_get(ftp, outstream, remote, xtype, resumepos TSRMLS_CC)) == PHP_FTP_FAILED) { ftp 969 ext/ftp/php_ftp.c ftp->stream = NULL; ftp 971 ext/ftp/php_ftp.c php_error_docref(NULL TSRMLS_CC, E_WARNING, "%s", ftp->inbuf); ftp 977 ext/ftp/php_ftp.c ftp->stream = NULL; ftp 989 ext/ftp/php_ftp.c ftpbuf_t *ftp; ftp 996 ext/ftp/php_ftp.c ZEND_FETCH_RESOURCE(ftp, ftpbuf_t*, &z_ftp, -1, le_ftpbuf_name, le_ftpbuf); ftp 998 ext/ftp/php_ftp.c if (!ftp->nb) { ftp 1003 ext/ftp/php_ftp.c if (ftp->direction) { ftp 1004 ext/ftp/php_ftp.c ret=ftp_nb_continue_write(ftp TSRMLS_CC); ftp 1006 ext/ftp/php_ftp.c ret=ftp_nb_continue_read(ftp TSRMLS_CC); ftp 1009 ext/ftp/php_ftp.c if (ret != PHP_FTP_MOREDATA && ftp->closestream) { ftp 1010 ext/ftp/php_ftp.c php_stream_close(ftp->stream); ftp 1011 ext/ftp/php_ftp.c ftp->stream = NULL; ftp 1015 ext/ftp/php_ftp.c php_error_docref(NULL TSRMLS_CC, E_WARNING, "%s", ftp->inbuf); ftp 1027 ext/ftp/php_ftp.c ftpbuf_t *ftp; ftp 1038 ext/ftp/php_ftp.c ZEND_FETCH_RESOURCE(ftp, ftpbuf_t*, &z_ftp, -1, le_ftpbuf_name, le_ftpbuf); ftp 1043 ext/ftp/php_ftp.c if (!ftp->autoseek && startpos == PHP_FTP_AUTORESUME) { ftp 1047 ext/ftp/php_ftp.c if (ftp->autoseek && startpos) { ftp 1050 ext/ftp/php_ftp.c startpos = ftp_size(ftp, remote); ftp 1060 ext/ftp/php_ftp.c if (!ftp_put(ftp, remote, stream, xtype, startpos TSRMLS_CC)) { ftp 1061 ext/ftp/php_ftp.c php_error_docref(NULL TSRMLS_CC, E_WARNING, "%s", ftp->inbuf); ftp 1074 ext/ftp/php_ftp.c ftpbuf_t *ftp; ftp 1085 ext/ftp/php_ftp.c ZEND_FETCH_RESOURCE(ftp, ftpbuf_t*, &z_ftp, -1, le_ftpbuf_name, le_ftpbuf); ftp 1090 ext/ftp/php_ftp.c if (!ftp->autoseek && startpos == PHP_FTP_AUTORESUME) { ftp 1094 ext/ftp/php_ftp.c if (ftp->autoseek && startpos) { ftp 1097 ext/ftp/php_ftp.c startpos = ftp_size(ftp, remote); ftp 1108 ext/ftp/php_ftp.c ftp->direction = 1; /* send */ ftp 1109 ext/ftp/php_ftp.c ftp->closestream = 0; /* do not close */ ftp 1111 ext/ftp/php_ftp.c if (((ret = ftp_nb_put(ftp, remote, stream, xtype, startpos TSRMLS_CC)) == PHP_FTP_FAILED)) { ftp 1112 ext/ftp/php_ftp.c php_error_docref(NULL TSRMLS_CC, E_WARNING, "%s", ftp->inbuf); ftp 1126 ext/ftp/php_ftp.c ftpbuf_t *ftp; ftp 1137 ext/ftp/php_ftp.c ZEND_FETCH_RESOURCE(ftp, ftpbuf_t*, &z_ftp, -1, le_ftpbuf_name, le_ftpbuf); ftp 1145 ext/ftp/php_ftp.c if (!ftp->autoseek && startpos == PHP_FTP_AUTORESUME) { ftp 1149 ext/ftp/php_ftp.c if (ftp->autoseek && startpos) { ftp 1152 ext/ftp/php_ftp.c startpos = ftp_size(ftp, remote); ftp 1162 ext/ftp/php_ftp.c if (!ftp_put(ftp, remote, instream, xtype, startpos TSRMLS_CC)) { ftp 1164 ext/ftp/php_ftp.c php_error_docref(NULL TSRMLS_CC, E_WARNING, "%s", ftp->inbuf); ftp 1179 ext/ftp/php_ftp.c ftpbuf_t *ftp; ftp 1190 ext/ftp/php_ftp.c ZEND_FETCH_RESOURCE(ftp, ftpbuf_t*, &z_ftp, -1, le_ftpbuf_name, le_ftpbuf); ftp 1198 ext/ftp/php_ftp.c if (!ftp->autoseek && startpos == PHP_FTP_AUTORESUME) { ftp 1202 ext/ftp/php_ftp.c if (ftp->autoseek && startpos) { ftp 1205 ext/ftp/php_ftp.c startpos = ftp_size(ftp, remote); ftp 1216 ext/ftp/php_ftp.c ftp->direction = 1; /* send */ ftp 1217 ext/ftp/php_ftp.c ftp->closestream = 1; /* do close */ ftp 1219 ext/ftp/php_ftp.c ret = ftp_nb_put(ftp, remote, instream, xtype, startpos TSRMLS_CC); ftp 1223 ext/ftp/php_ftp.c ftp->stream = NULL; ftp 1227 ext/ftp/php_ftp.c php_error_docref(NULL TSRMLS_CC, E_WARNING, "%s", ftp->inbuf); ftp 1239 ext/ftp/php_ftp.c ftpbuf_t *ftp; ftp 1247 ext/ftp/php_ftp.c ZEND_FETCH_RESOURCE(ftp, ftpbuf_t*, &z_ftp, -1, le_ftpbuf_name, le_ftpbuf); ftp 1250 ext/ftp/php_ftp.c RETURN_LONG(ftp_size(ftp, file)); ftp 1259 ext/ftp/php_ftp.c ftpbuf_t *ftp; ftp 1267 ext/ftp/php_ftp.c ZEND_FETCH_RESOURCE(ftp, ftpbuf_t*, &z_ftp, -1, le_ftpbuf_name, le_ftpbuf); ftp 1270 ext/ftp/php_ftp.c RETURN_LONG(ftp_mdtm(ftp, file)); ftp 1279 ext/ftp/php_ftp.c ftpbuf_t *ftp; ftp 1287 ext/ftp/php_ftp.c ZEND_FETCH_RESOURCE(ftp, ftpbuf_t*, &z_ftp, -1, le_ftpbuf_name, le_ftpbuf); ftp 1290 ext/ftp/php_ftp.c if (!ftp_rename(ftp, src, dest)) { ftp 1291 ext/ftp/php_ftp.c php_error_docref(NULL TSRMLS_CC, E_WARNING, "%s", ftp->inbuf); ftp 1304 ext/ftp/php_ftp.c ftpbuf_t *ftp; ftp 1312 ext/ftp/php_ftp.c ZEND_FETCH_RESOURCE(ftp, ftpbuf_t*, &z_ftp, -1, le_ftpbuf_name, le_ftpbuf); ftp 1315 ext/ftp/php_ftp.c if (!ftp_delete(ftp, file)) { ftp 1316 ext/ftp/php_ftp.c php_error_docref(NULL TSRMLS_CC, E_WARNING, "%s", ftp->inbuf); ftp 1329 ext/ftp/php_ftp.c ftpbuf_t *ftp; ftp 1337 ext/ftp/php_ftp.c ZEND_FETCH_RESOURCE(ftp, ftpbuf_t*, &z_ftp, -1, le_ftpbuf_name, le_ftpbuf); ftp 1340 ext/ftp/php_ftp.c if (!ftp_site(ftp, cmd)) { ftp 1341 ext/ftp/php_ftp.c php_error_docref(NULL TSRMLS_CC, E_WARNING, "%s", ftp->inbuf); ftp 1354 ext/ftp/php_ftp.c ftpbuf_t *ftp; ftp 1360 ext/ftp/php_ftp.c ZEND_FETCH_RESOURCE(ftp, ftpbuf_t*, &z_ftp, -1, le_ftpbuf_name, le_ftpbuf); ftp 1362 ext/ftp/php_ftp.c ftp_quit(ftp); ftp 1374 ext/ftp/php_ftp.c ftpbuf_t *ftp; ftp 1380 ext/ftp/php_ftp.c ZEND_FETCH_RESOURCE(ftp, ftpbuf_t*, &z_ftp, -1, le_ftpbuf_name, le_ftpbuf); ftp 1393 ext/ftp/php_ftp.c ftp->timeout_sec = Z_LVAL_P(z_value); ftp 1402 ext/ftp/php_ftp.c ftp->autoseek = Z_LVAL_P(z_value); ftp 1411 ext/ftp/php_ftp.c ftp->usepasvaddress = Z_LVAL_P(z_value); ftp 1428 ext/ftp/php_ftp.c ftpbuf_t *ftp; ftp 1434 ext/ftp/php_ftp.c ZEND_FETCH_RESOURCE(ftp, ftpbuf_t*, &z_ftp, -1, le_ftpbuf_name, le_ftpbuf); ftp 1438 ext/ftp/php_ftp.c RETURN_LONG(ftp->timeout_sec); ftp 1441 ext/ftp/php_ftp.c RETURN_BOOL(ftp->autoseek); ftp 1444 ext/ftp/php_ftp.c RETURN_BOOL(ftp->usepasvaddress); ftp 35 ext/ftp/php_ftp.h PHP_MINIT_FUNCTION(ftp); ftp 36 ext/ftp/php_ftp.h PHP_MINFO_FUNCTION(ftp);