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);
ftp               106 ext/ftp/ftp.c  static databuf_t*	data_accept(databuf_t *data, ftpbuf_t *ftp);
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);
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               182 ext/ftp/ftp.c  			php_stream_close(ftp->stream);
ftp               184 ext/ftp/ftp.c  	if (ftp->fd != -1) {
ftp               186 ext/ftp/ftp.c  		if (ftp->ssl_active) {
ftp               187 ext/ftp/ftp.c  			SSL_shutdown(ftp->ssl_handle);
ftp               188 ext/ftp/ftp.c  			SSL_free(ftp->ssl_handle);
ftp               191 ext/ftp/ftp.c  		closesocket(ftp->fd);
ftp               193 ext/ftp/ftp.c  	ftp_gc(ftp);
ftp               194 ext/ftp/ftp.c  	efree(ftp);
ftp               202 ext/ftp/ftp.c  ftp_gc(ftpbuf_t *ftp)
ftp               204 ext/ftp/ftp.c  	if (ftp == NULL) {
ftp               207 ext/ftp/ftp.c  	if (ftp->pwd) {
ftp               208 ext/ftp/ftp.c  		efree(ftp->pwd);
ftp               209 ext/ftp/ftp.c  		ftp->pwd = NULL;
ftp               211 ext/ftp/ftp.c  	if (ftp->syst) {
ftp               212 ext/ftp/ftp.c  		efree(ftp->syst);
ftp               213 ext/ftp/ftp.c  		ftp->syst = NULL;
ftp               221 ext/ftp/ftp.c  ftp_quit(ftpbuf_t *ftp)
ftp               223 ext/ftp/ftp.c  	if (ftp == NULL) {
ftp               227 ext/ftp/ftp.c  	if (!ftp_putcmd(ftp, "QUIT", NULL)) {
ftp               230 ext/ftp/ftp.c  	if (!ftp_getresp(ftp) || ftp->resp != 221) {
ftp               234 ext/ftp/ftp.c  	if (ftp->pwd) {
ftp               235 ext/ftp/ftp.c  		efree(ftp->pwd);
ftp               236 ext/ftp/ftp.c  		ftp->pwd = NULL;
ftp               246 ext/ftp/ftp.c  ftp_login(ftpbuf_t *ftp, const char *user, const char *pass)
ftp               254 ext/ftp/ftp.c  	if (ftp == NULL) {
ftp               259 ext/ftp/ftp.c  	if (ftp->use_ssl && !ftp->ssl_active) {
ftp               260 ext/ftp/ftp.c  		if (!ftp_putcmd(ftp, "AUTH", "TLS")) {
ftp               263 ext/ftp/ftp.c  		if (!ftp_getresp(ftp)) {
ftp               267 ext/ftp/ftp.c  		if (ftp->resp != 234) {
ftp               268 ext/ftp/ftp.c  			if (!ftp_putcmd(ftp, "AUTH", "SSL")) {
ftp               271 ext/ftp/ftp.c  			if (!ftp_getresp(ftp)) {
ftp               275 ext/ftp/ftp.c  			if (ftp->resp != 334) {
ftp               278 ext/ftp/ftp.c  				ftp->old_ssl = 1;
ftp               279 ext/ftp/ftp.c  				ftp->use_ssl_for_data = 1;
ftp               294 ext/ftp/ftp.c  		ftp->ssl_handle = SSL_new(ctx);
ftp               295 ext/ftp/ftp.c  		if (ftp->ssl_handle == NULL) {
ftp               301 ext/ftp/ftp.c  		SSL_set_fd(ftp->ssl_handle, ftp->fd);
ftp               304 ext/ftp/ftp.c  			res = SSL_connect(ftp->ssl_handle);
ftp               305 ext/ftp/ftp.c  			err = SSL_get_error(ftp->ssl_handle, res);
ftp               315 ext/ftp/ftp.c  					SSL_shutdown(ftp->ssl_handle);
ftp               323 ext/ftp/ftp.c  						p.fd = ftp->fd;
ftp               335 ext/ftp/ftp.c  					SSL_shutdown(ftp->ssl_handle);
ftp               336 ext/ftp/ftp.c  					SSL_free(ftp->ssl_handle);
ftp               341 ext/ftp/ftp.c  		ftp->ssl_active = 1;
ftp               343 ext/ftp/ftp.c  		if (!ftp->old_ssl) {
ftp               346 ext/ftp/ftp.c  			if (!ftp_putcmd(ftp, "PBSZ", "0")) {
ftp               349 ext/ftp/ftp.c  			if (!ftp_getresp(ftp)) {
ftp               354 ext/ftp/ftp.c  			if (!ftp_putcmd(ftp, "PROT", "P")) {
ftp               357 ext/ftp/ftp.c  			if (!ftp_getresp(ftp)) {
ftp               361 ext/ftp/ftp.c  			ftp->use_ssl_for_data = (ftp->resp >= 200 && ftp->resp <=299);
ftp               366 ext/ftp/ftp.c  	if (!ftp_putcmd(ftp, "USER", user)) {
ftp               369 ext/ftp/ftp.c  	if (!ftp_getresp(ftp)) {
ftp               372 ext/ftp/ftp.c  	if (ftp->resp == 230) {
ftp               375 ext/ftp/ftp.c  	if (ftp->resp != 331) {
ftp               378 ext/ftp/ftp.c  	if (!ftp_putcmd(ftp, "PASS", pass)) {
ftp               381 ext/ftp/ftp.c  	if (!ftp_getresp(ftp)) {
ftp               384 ext/ftp/ftp.c  	return (ftp->resp == 230);
ftp               391 ext/ftp/ftp.c  ftp_reinit(ftpbuf_t *ftp)
ftp               393 ext/ftp/ftp.c  	if (ftp == NULL) {
ftp               397 ext/ftp/ftp.c  	ftp_gc(ftp);
ftp               399 ext/ftp/ftp.c  	ftp->nb = 0;
ftp               401 ext/ftp/ftp.c  	if (!ftp_putcmd(ftp, "REIN", NULL)) {
ftp               404 ext/ftp/ftp.c  	if (!ftp_getresp(ftp) || ftp->resp != 220) {
ftp               415 ext/ftp/ftp.c  ftp_syst(ftpbuf_t *ftp)
ftp               419 ext/ftp/ftp.c  	if (ftp == NULL) {
ftp               424 ext/ftp/ftp.c  	if (ftp->syst) {
ftp               425 ext/ftp/ftp.c  		return ftp->syst;
ftp               427 ext/ftp/ftp.c  	if (!ftp_putcmd(ftp, "SYST", NULL)) {
ftp               430 ext/ftp/ftp.c  	if (!ftp_getresp(ftp) || ftp->resp != 215) {
ftp               433 ext/ftp/ftp.c  	syst = ftp->inbuf;
ftp               440 ext/ftp/ftp.c  	ftp->syst = estrdup(syst);
ftp               444 ext/ftp/ftp.c  	return ftp->syst;
ftp               451 ext/ftp/ftp.c  ftp_pwd(ftpbuf_t *ftp)
ftp               455 ext/ftp/ftp.c  	if (ftp == NULL) {
ftp               460 ext/ftp/ftp.c  	if (ftp->pwd) {
ftp               461 ext/ftp/ftp.c  		return ftp->pwd;
ftp               463 ext/ftp/ftp.c  	if (!ftp_putcmd(ftp, "PWD", NULL)) {
ftp               466 ext/ftp/ftp.c  	if (!ftp_getresp(ftp) || ftp->resp != 257) {
ftp               470 ext/ftp/ftp.c  	if ((pwd = strchr(ftp->inbuf, '"')) == NULL) {
ftp               476 ext/ftp/ftp.c  	ftp->pwd = estrndup(pwd, end - pwd);
ftp               478 ext/ftp/ftp.c  	return ftp->pwd;
ftp               485 ext/ftp/ftp.c  ftp_exec(ftpbuf_t *ftp, const char *cmd)
ftp               487 ext/ftp/ftp.c  	if (ftp == NULL) {
ftp               490 ext/ftp/ftp.c  	if (!ftp_putcmd(ftp, "SITE EXEC", cmd)) {
ftp               493 ext/ftp/ftp.c  	if (!ftp_getresp(ftp) || ftp->resp != 200) {
ftp               504 ext/ftp/ftp.c  ftp_raw(ftpbuf_t *ftp, const char *cmd, zval *return_value)
ftp               506 ext/ftp/ftp.c  	if (ftp == NULL || cmd == NULL) {
ftp               509 ext/ftp/ftp.c  	if (!ftp_putcmd(ftp, cmd, NULL)) {
ftp               513 ext/ftp/ftp.c  	while (ftp_readline(ftp)) {
ftp               514 ext/ftp/ftp.c  		add_next_index_string(return_value, ftp->inbuf);
ftp               515 ext/ftp/ftp.c  		if (isdigit(ftp->inbuf[0]) && isdigit(ftp->inbuf[1]) && isdigit(ftp->inbuf[2]) && ftp->inbuf[3] == ' ') {
ftp               525 ext/ftp/ftp.c  ftp_chdir(ftpbuf_t *ftp, const char *dir)
ftp               527 ext/ftp/ftp.c  	if (ftp == NULL) {
ftp               531 ext/ftp/ftp.c  	if (ftp->pwd) {
ftp               532 ext/ftp/ftp.c  		efree(ftp->pwd);
ftp               533 ext/ftp/ftp.c  		ftp->pwd = NULL;
ftp               536 ext/ftp/ftp.c  	if (!ftp_putcmd(ftp, "CWD", dir)) {
ftp               539 ext/ftp/ftp.c  	if (!ftp_getresp(ftp) || ftp->resp != 250) {
ftp               549 ext/ftp/ftp.c  ftp_cdup(ftpbuf_t *ftp)
ftp               551 ext/ftp/ftp.c  	if (ftp == NULL) {
ftp               555 ext/ftp/ftp.c  	if (ftp->pwd) {
ftp               556 ext/ftp/ftp.c  		efree(ftp->pwd);
ftp               557 ext/ftp/ftp.c  		ftp->pwd = NULL;
ftp               560 ext/ftp/ftp.c  	if (!ftp_putcmd(ftp, "CDUP", NULL)) {
ftp               563 ext/ftp/ftp.c  	if (!ftp_getresp(ftp) || ftp->resp != 250) {
ftp               573 ext/ftp/ftp.c  ftp_mkdir(ftpbuf_t *ftp, const char *dir)
ftp               578 ext/ftp/ftp.c  	if (ftp == NULL) {
ftp               581 ext/ftp/ftp.c  	if (!ftp_putcmd(ftp, "MKD", dir)) {
ftp               584 ext/ftp/ftp.c  	if (!ftp_getresp(ftp) || ftp->resp != 257) {
ftp               588 ext/ftp/ftp.c  	if ((mkd = strchr(ftp->inbuf, '"')) == NULL) {
ftp               605 ext/ftp/ftp.c  ftp_rmdir(ftpbuf_t *ftp, const char *dir)
ftp               607 ext/ftp/ftp.c  	if (ftp == NULL) {
ftp               610 ext/ftp/ftp.c  	if (!ftp_putcmd(ftp, "RMD", dir)) {
ftp               613 ext/ftp/ftp.c  	if (!ftp_getresp(ftp) || ftp->resp != 250) {
ftp               623 ext/ftp/ftp.c  ftp_chmod(ftpbuf_t *ftp, const int mode, const char *filename, const int filename_len)
ftp               627 ext/ftp/ftp.c  	if (ftp == NULL || filename_len <= 0) {
ftp               633 ext/ftp/ftp.c  	if (!ftp_putcmd(ftp, "SITE", buffer)) {
ftp               640 ext/ftp/ftp.c  	if (!ftp_getresp(ftp) || ftp->resp != 200) {
ftp               651 ext/ftp/ftp.c  ftp_alloc(ftpbuf_t *ftp, const zend_long size, zend_string **response)
ftp               655 ext/ftp/ftp.c  	if (ftp == NULL || size <= 0) {
ftp               661 ext/ftp/ftp.c  	if (!ftp_putcmd(ftp, "ALLO", buffer)) {
ftp               665 ext/ftp/ftp.c  	if (!ftp_getresp(ftp)) {
ftp               670 ext/ftp/ftp.c  		*response = zend_string_init(ftp->inbuf, strlen(ftp->inbuf), 0);
ftp               673 ext/ftp/ftp.c  	if (ftp->resp < 200 || ftp->resp >= 300) {
ftp               684 ext/ftp/ftp.c  ftp_nlist(ftpbuf_t *ftp, const char *path)
ftp               686 ext/ftp/ftp.c  	return ftp_genlist(ftp, "NLST", path);
ftp               693 ext/ftp/ftp.c  ftp_list(ftpbuf_t *ftp, const char *path, int recursive)
ftp               695 ext/ftp/ftp.c  	return ftp_genlist(ftp, ((recursive) ? "LIST -R" : "LIST"), path);
ftp               702 ext/ftp/ftp.c  ftp_type(ftpbuf_t *ftp, ftptype_t type)
ftp               706 ext/ftp/ftp.c  	if (ftp == NULL) {
ftp               709 ext/ftp/ftp.c  	if (type == ftp->type) {
ftp               719 ext/ftp/ftp.c  	if (!ftp_putcmd(ftp, "TYPE", typechar)) {
ftp               722 ext/ftp/ftp.c  	if (!ftp_getresp(ftp) || ftp->resp != 200) {
ftp               725 ext/ftp/ftp.c  	ftp->type = type;
ftp               734 ext/ftp/ftp.c  ftp_pasv(ftpbuf_t *ftp, int pasv)
ftp               743 ext/ftp/ftp.c  	if (ftp == NULL) {
ftp               746 ext/ftp/ftp.c  	if (pasv && ftp->pasv == 2) {
ftp               749 ext/ftp/ftp.c  	ftp->pasv = 0;
ftp               753 ext/ftp/ftp.c  	n = sizeof(ftp->pasvaddr);
ftp               754 ext/ftp/ftp.c  	memset(&ftp->pasvaddr, 0, n);
ftp               755 ext/ftp/ftp.c  	sa = (struct sockaddr *) &ftp->pasvaddr;
ftp               757 ext/ftp/ftp.c  	if (getpeername(ftp->fd, sa, &n) < 0) {
ftp               767 ext/ftp/ftp.c  		if (!ftp_putcmd(ftp, "EPSV", NULL)) {
ftp               770 ext/ftp/ftp.c  		if (!ftp_getresp(ftp)) {
ftp               773 ext/ftp/ftp.c  		if (ftp->resp == 229) {
ftp               775 ext/ftp/ftp.c  			for (ptr = ftp->inbuf; *ptr && *ptr != '('; ptr++);
ftp               790 ext/ftp/ftp.c  			ftp->pasv = 2;
ftp               798 ext/ftp/ftp.c  	if (!ftp_putcmd(ftp, "PASV", NULL)) {
ftp               801 ext/ftp/ftp.c  	if (!ftp_getresp(ftp) || ftp->resp != 227) {
ftp               805 ext/ftp/ftp.c  	for (ptr = ftp->inbuf; *ptr && !isdigit(*ptr); ptr++);
ftp               814 ext/ftp/ftp.c  	if (ftp->usepasvaddress) {
ftp               819 ext/ftp/ftp.c  	ftp->pasv = 2;
ftp               828 ext/ftp/ftp.c  ftp_get(ftpbuf_t *ftp, php_stream *outstream, const char *path, ftptype_t type, zend_long resumepos)
ftp               834 ext/ftp/ftp.c  	if (ftp == NULL) {
ftp               837 ext/ftp/ftp.c  	if (!ftp_type(ftp, type)) {
ftp               841 ext/ftp/ftp.c  	if ((data = ftp_getdata(ftp)) == NULL) {
ftp               845 ext/ftp/ftp.c  	ftp->data = data;
ftp               849 ext/ftp/ftp.c  		if (!ftp_putcmd(ftp, "REST", arg)) {
ftp               852 ext/ftp/ftp.c  		if (!ftp_getresp(ftp) || (ftp->resp != 350)) {
ftp               857 ext/ftp/ftp.c  	if (!ftp_putcmd(ftp, "RETR", path)) {
ftp               860 ext/ftp/ftp.c  	if (!ftp_getresp(ftp) || (ftp->resp != 150 && ftp->resp != 125)) {
ftp               864 ext/ftp/ftp.c  	if ((data = data_accept(data, ftp)) == NULL) {
ftp               868 ext/ftp/ftp.c  	while ((rcvd = my_recv(ftp, data->fd, data->buf, FTP_BUFSIZE))) {
ftp               904 ext/ftp/ftp.c  	ftp->data = data = data_close(ftp, data);
ftp               906 ext/ftp/ftp.c  	if (!ftp_getresp(ftp) || (ftp->resp != 226 && ftp->resp != 250)) {
ftp               912 ext/ftp/ftp.c  	ftp->data = data_close(ftp, data);
ftp               920 ext/ftp/ftp.c  ftp_put(ftpbuf_t *ftp, const char *path, php_stream *instream, ftptype_t type, zend_long startpos)
ftp               928 ext/ftp/ftp.c  	if (ftp == NULL) {
ftp               931 ext/ftp/ftp.c  	if (!ftp_type(ftp, type)) {
ftp               934 ext/ftp/ftp.c  	if ((data = ftp_getdata(ftp)) == NULL) {
ftp               937 ext/ftp/ftp.c  	ftp->data = data;
ftp               941 ext/ftp/ftp.c  		if (!ftp_putcmd(ftp, "REST", arg)) {
ftp               944 ext/ftp/ftp.c  		if (!ftp_getresp(ftp) || (ftp->resp != 350)) {
ftp               949 ext/ftp/ftp.c  	if (!ftp_putcmd(ftp, "STOR", path)) {
ftp               952 ext/ftp/ftp.c  	if (!ftp_getresp(ftp) || (ftp->resp != 150 && ftp->resp != 125)) {
ftp               955 ext/ftp/ftp.c  	if ((data = data_accept(data, ftp)) == NULL) {
ftp               964 ext/ftp/ftp.c  			if (my_send(ftp, data->fd, data->buf, size) != size) {
ftp               980 ext/ftp/ftp.c  	if (size && my_send(ftp, data->fd, data->buf, size) != size) {
ftp               983 ext/ftp/ftp.c  	ftp->data = data = data_close(ftp, data);
ftp               985 ext/ftp/ftp.c  	if (!ftp_getresp(ftp) || (ftp->resp != 226 && ftp->resp != 250 && ftp->resp != 200)) {
ftp               990 ext/ftp/ftp.c  	ftp->data = data_close(ftp, data);
ftp               998 ext/ftp/ftp.c  ftp_size(ftpbuf_t *ftp, const char *path)
ftp              1000 ext/ftp/ftp.c  	if (ftp == NULL) {
ftp              1003 ext/ftp/ftp.c  	if (!ftp_type(ftp, FTPTYPE_IMAGE)) {
ftp              1006 ext/ftp/ftp.c  	if (!ftp_putcmd(ftp, "SIZE", path)) {
ftp              1009 ext/ftp/ftp.c  	if (!ftp_getresp(ftp) || ftp->resp != 213) {
ftp              1012 ext/ftp/ftp.c  	return atol(ftp->inbuf);
ftp              1019 ext/ftp/ftp.c  ftp_mdtm(ftpbuf_t *ftp, const char *path)
ftp              1027 ext/ftp/ftp.c  	if (ftp == NULL) {
ftp              1030 ext/ftp/ftp.c  	if (!ftp_putcmd(ftp, "MDTM", path)) {
ftp              1033 ext/ftp/ftp.c  	if (!ftp_getresp(ftp) || ftp->resp != 213) {
ftp              1037 ext/ftp/ftp.c  	for (ptr = ftp->inbuf; *ptr && !isdigit(*ptr); ptr++);
ftp              1067 ext/ftp/ftp.c  ftp_delete(ftpbuf_t *ftp, const char *path)
ftp              1069 ext/ftp/ftp.c  	if (ftp == NULL) {
ftp              1072 ext/ftp/ftp.c  	if (!ftp_putcmd(ftp, "DELE", path)) {
ftp              1075 ext/ftp/ftp.c  	if (!ftp_getresp(ftp) || ftp->resp != 250) {
ftp              1086 ext/ftp/ftp.c  ftp_rename(ftpbuf_t *ftp, const char *src, const char *dest)
ftp              1088 ext/ftp/ftp.c  	if (ftp == NULL) {
ftp              1091 ext/ftp/ftp.c  	if (!ftp_putcmd(ftp, "RNFR", src)) {
ftp              1094 ext/ftp/ftp.c  	if (!ftp_getresp(ftp) || ftp->resp != 350) {
ftp              1097 ext/ftp/ftp.c  	if (!ftp_putcmd(ftp, "RNTO", dest)) {
ftp              1100 ext/ftp/ftp.c  	if (!ftp_getresp(ftp) || ftp->resp != 250) {
ftp              1110 ext/ftp/ftp.c  ftp_site(ftpbuf_t *ftp, const char *cmd)
ftp              1112 ext/ftp/ftp.c  	if (ftp == NULL) {
ftp              1115 ext/ftp/ftp.c  	if (!ftp_putcmd(ftp, "SITE", cmd)) {
ftp              1118 ext/ftp/ftp.c  	if (!ftp_getresp(ftp) || ftp->resp < 200 || ftp->resp >= 300) {
ftp              1131 ext/ftp/ftp.c  ftp_putcmd(ftpbuf_t *ftp, const char *cmd, const char *args)
ftp              1148 ext/ftp/ftp.c  		size = slprintf(ftp->outbuf, sizeof(ftp->outbuf), "%s %s\r\n", cmd, args);
ftp              1154 ext/ftp/ftp.c  		size = slprintf(ftp->outbuf, sizeof(ftp->outbuf), "%s\r\n", cmd);
ftp              1157 ext/ftp/ftp.c  	data = ftp->outbuf;
ftp              1160 ext/ftp/ftp.c  	ftp->extra = NULL;
ftp              1162 ext/ftp/ftp.c  	if (my_send(ftp, ftp->fd, data, size) != size) {
ftp              1172 ext/ftp/ftp.c  ftp_readline(ftpbuf_t *ftp)
ftp              1180 ext/ftp/ftp.c  	if (ftp->extra) {
ftp              1181 ext/ftp/ftp.c  		memmove(ftp->inbuf, ftp->extra, ftp->extralen);
ftp              1182 ext/ftp/ftp.c  		rcvd = ftp->extralen;
ftp              1185 ext/ftp/ftp.c  	data = ftp->inbuf;
ftp              1192 ext/ftp/ftp.c  				ftp->extra = eol + 1;
ftp              1194 ext/ftp/ftp.c  					ftp->extra++;
ftp              1197 ext/ftp/ftp.c  				if ((ftp->extralen = --rcvd) == 0) {
ftp              1198 ext/ftp/ftp.c  					ftp->extra = NULL;
ftp              1203 ext/ftp/ftp.c  				ftp->extra = eol + 1;
ftp              1204 ext/ftp/ftp.c  				if ((ftp->extralen = --rcvd) == 0) {
ftp              1205 ext/ftp/ftp.c  					ftp->extra = NULL;
ftp              1212 ext/ftp/ftp.c  		if ((rcvd = my_recv(ftp, ftp->fd, data, size)) < 1) {
ftp              1224 ext/ftp/ftp.c  ftp_getresp(ftpbuf_t *ftp)
ftp              1226 ext/ftp/ftp.c  	if (ftp == NULL) {
ftp              1229 ext/ftp/ftp.c  	ftp->resp = 0;
ftp              1233 ext/ftp/ftp.c  		if (!ftp_readline(ftp)) {
ftp              1238 ext/ftp/ftp.c  		if (isdigit(ftp->inbuf[0]) && isdigit(ftp->inbuf[1]) && isdigit(ftp->inbuf[2]) && ftp->inbuf[3] == ' ') {
ftp              1244 ext/ftp/ftp.c  	if (!isdigit(ftp->inbuf[0]) || !isdigit(ftp->inbuf[1]) || !isdigit(ftp->inbuf[2])) {
ftp              1248 ext/ftp/ftp.c  	ftp->resp = 100 * (ftp->inbuf[0] - '0') + 10 * (ftp->inbuf[1] - '0') + (ftp->inbuf[2] - '0');
ftp              1250 ext/ftp/ftp.c  	memmove(ftp->inbuf, ftp->inbuf + 4, FTP_BUFSIZE - 4);
ftp              1252 ext/ftp/ftp.c  	if (ftp->extra) {
ftp              1253 ext/ftp/ftp.c  		ftp->extra -= 4;
ftp              1262 ext/ftp/ftp.c  my_send(ftpbuf_t *ftp, php_socket_t s, void *buf, size_t len)
ftp              1276 ext/ftp/ftp.c  		n = php_pollfd_for_ms(s, POLLOUT, ftp->timeout_sec * 1000);
ftp              1292 ext/ftp/ftp.c  		if (ftp->use_ssl && ftp->fd == s && ftp->ssl_active) {
ftp              1293 ext/ftp/ftp.c  			handle = ftp->ssl_handle;
ftp              1294 ext/ftp/ftp.c  			fd = ftp->fd;
ftp              1295 ext/ftp/ftp.c  		} else if (ftp->use_ssl && ftp->fd != s && ftp->use_ssl_for_data && ftp->data->ssl_active) {
ftp              1296 ext/ftp/ftp.c  			handle = ftp->data->ssl_handle;
ftp              1297 ext/ftp/ftp.c  			fd = ftp->data->fd;
ftp              1356 ext/ftp/ftp.c  my_recv(ftpbuf_t *ftp, php_socket_t s, void *buf, size_t len)
ftp              1366 ext/ftp/ftp.c  	n = php_pollfd_for_ms(s, PHP_POLLREADABLE, ftp->timeout_sec * 1000);
ftp              1381 ext/ftp/ftp.c  	if (ftp->use_ssl && ftp->fd == s && ftp->ssl_active) {
ftp              1382 ext/ftp/ftp.c  		handle = ftp->ssl_handle;
ftp              1383 ext/ftp/ftp.c  		fd = ftp->fd;
ftp              1384 ext/ftp/ftp.c  	} else if (ftp->use_ssl && ftp->fd != s && ftp->use_ssl_for_data && ftp->data->ssl_active) {
ftp              1385 ext/ftp/ftp.c  		handle = ftp->data->ssl_handle;
ftp              1386 ext/ftp/ftp.c  		fd = ftp->data->fd;
ftp              1437 ext/ftp/ftp.c  data_available(ftpbuf_t *ftp, php_socket_t s)
ftp              1461 ext/ftp/ftp.c  data_writeable(ftpbuf_t *ftp, php_socket_t s)
ftp              1486 ext/ftp/ftp.c  my_accept(ftpbuf_t *ftp, php_socket_t s, struct sockaddr *addr, socklen_t *addrlen)
ftp              1490 ext/ftp/ftp.c  	n = php_pollfd_for_ms(s, PHP_POLLREADABLE, ftp->timeout_sec * 1000);
ftp              1511 ext/ftp/ftp.c  ftp_getdata(ftpbuf_t *ftp)
ftp              1524 ext/ftp/ftp.c  	if (ftp->pasv && !ftp_pasv(ftp, 1)) {
ftp              1531 ext/ftp/ftp.c  	data->type = ftp->type;
ftp              1533 ext/ftp/ftp.c  	sa = (struct sockaddr *) &ftp->localaddr;
ftp              1541 ext/ftp/ftp.c  	if (ftp->pasv) {
ftp              1543 ext/ftp/ftp.c  		ftp->pasv = 1;
ftp              1547 ext/ftp/ftp.c  		size = php_sockaddr_size(&ftp->pasvaddr);
ftp              1548 ext/ftp/ftp.c  		tv.tv_sec = ftp->timeout_sec;
ftp              1550 ext/ftp/ftp.c  		if (php_connect_nonb(fd, (struct sockaddr*) &ftp->pasvaddr, size, &tv) == -1) {
ftp              1557 ext/ftp/ftp.c  		ftp->data = data;
ftp              1593 ext/ftp/ftp.c  		if (!ftp_putcmd(ftp, "EPRT", eprtarg)) {
ftp              1597 ext/ftp/ftp.c  		if (!ftp_getresp(ftp) || ftp->resp != 200) {
ftp              1601 ext/ftp/ftp.c  		ftp->data = data;
ftp              1611 ext/ftp/ftp.c  	if (!ftp_putcmd(ftp, "PORT", arg)) {
ftp              1614 ext/ftp/ftp.c  	if (!ftp_getresp(ftp) || ftp->resp != 200) {
ftp              1618 ext/ftp/ftp.c  	ftp->data = data;
ftp              1633 ext/ftp/ftp.c  data_accept(databuf_t *data, ftpbuf_t *ftp)
ftp              1649 ext/ftp/ftp.c  	data->fd = my_accept(ftp, data->listener, (struct sockaddr*) &addr, &size);
ftp              1662 ext/ftp/ftp.c  	if (ftp->use_ssl && ftp->use_ssl_for_data) {
ftp              1684 ext/ftp/ftp.c  		if (ftp->old_ssl) {
ftp              1685 ext/ftp/ftp.c  			SSL_copy_session_id(data->ssl_handle, ftp->ssl_handle);
ftp              1707 ext/ftp/ftp.c  						p.fd = ftp->fd;
ftp              1737 ext/ftp/ftp.c  data_close(ftpbuf_t *ftp, databuf_t *data)
ftp              1772 ext/ftp/ftp.c  	if (ftp) {
ftp              1773 ext/ftp/ftp.c  		ftp->data = NULL;
ftp              1783 ext/ftp/ftp.c  ftp_genlist(ftpbuf_t *ftp, const char *cmd, const char *path)
ftp              1801 ext/ftp/ftp.c  	if (!ftp_type(ftp, FTPTYPE_ASCII)) {
ftp              1805 ext/ftp/ftp.c  	if ((data = ftp_getdata(ftp)) == NULL) {
ftp              1808 ext/ftp/ftp.c  	ftp->data = data;
ftp              1810 ext/ftp/ftp.c  	if (!ftp_putcmd(ftp, cmd, path)) {
ftp              1813 ext/ftp/ftp.c  	if (!ftp_getresp(ftp) || (ftp->resp != 150 && ftp->resp != 125 && ftp->resp != 226)) {
ftp              1818 ext/ftp/ftp.c  	if (ftp->resp == 226) {
ftp              1819 ext/ftp/ftp.c  		ftp->data = data_close(ftp, data);
ftp              1825 ext/ftp/ftp.c  	if ((data = data_accept(data, ftp)) == NULL) {
ftp              1831 ext/ftp/ftp.c  	while ((rcvd = my_recv(ftp, data->fd, data->buf, FTP_BUFSIZE))) {
ftp              1847 ext/ftp/ftp.c  	ftp->data = data_close(ftp, data);
ftp              1870 ext/ftp/ftp.c  	if (!ftp_getresp(ftp) || (ftp->resp != 226 && ftp->resp != 250)) {
ftp              1877 ext/ftp/ftp.c  	ftp->data = data_close(ftp, data);
ftp              1888 ext/ftp/ftp.c  ftp_nb_get(ftpbuf_t *ftp, php_stream *outstream, const char *path, ftptype_t type, zend_long resumepos)
ftp              1893 ext/ftp/ftp.c  	if (ftp == NULL) {
ftp              1897 ext/ftp/ftp.c  	if (!ftp_type(ftp, type)) {
ftp              1901 ext/ftp/ftp.c  	if ((data = ftp_getdata(ftp)) == NULL) {
ftp              1907 ext/ftp/ftp.c  		if (!ftp_putcmd(ftp, "REST", arg)) {
ftp              1910 ext/ftp/ftp.c  		if (!ftp_getresp(ftp) || (ftp->resp != 350)) {
ftp              1915 ext/ftp/ftp.c  	if (!ftp_putcmd(ftp, "RETR", path)) {
ftp              1918 ext/ftp/ftp.c  	if (!ftp_getresp(ftp) || (ftp->resp != 150 && ftp->resp != 125)) {
ftp              1922 ext/ftp/ftp.c  	if ((data = data_accept(data, ftp)) == NULL) {
ftp              1926 ext/ftp/ftp.c  	ftp->data = data;
ftp              1927 ext/ftp/ftp.c  	ftp->stream = outstream;
ftp              1928 ext/ftp/ftp.c  	ftp->lastch = 0;
ftp              1929 ext/ftp/ftp.c  	ftp->nb = 1;
ftp              1931 ext/ftp/ftp.c  	return (ftp_nb_continue_read(ftp));
ftp              1934 ext/ftp/ftp.c  	ftp->data = data_close(ftp, data);
ftp              1942 ext/ftp/ftp.c  ftp_nb_continue_read(ftpbuf_t *ftp)
ftp              1950 ext/ftp/ftp.c  	data = ftp->data;
ftp              1953 ext/ftp/ftp.c  	if (!data_available(ftp, data->fd)) {
ftp              1957 ext/ftp/ftp.c  	type = ftp->type;
ftp              1959 ext/ftp/ftp.c  	lastch = ftp->lastch;
ftp              1960 ext/ftp/ftp.c  	if ((rcvd = my_recv(ftp, data->fd, data->buf, FTP_BUFSIZE))) {
ftp              1968 ext/ftp/ftp.c  					php_stream_putc(ftp->stream, '\r');
ftp              1971 ext/ftp/ftp.c  					php_stream_putc(ftp->stream, *ptr);
ftp              1975 ext/ftp/ftp.c  		} else if (rcvd != php_stream_write(ftp->stream, data->buf, rcvd)) {
ftp              1979 ext/ftp/ftp.c  		ftp->lastch = lastch;
ftp              1984 ext/ftp/ftp.c  		php_stream_putc(ftp->stream, '\r');
ftp              1987 ext/ftp/ftp.c  	ftp->data = data = data_close(ftp, data);
ftp              1989 ext/ftp/ftp.c  	if (!ftp_getresp(ftp) || (ftp->resp != 226 && ftp->resp != 250)) {
ftp              1993 ext/ftp/ftp.c  	ftp->nb = 0;
ftp              1996 ext/ftp/ftp.c  	ftp->nb = 0;
ftp              1997 ext/ftp/ftp.c  	ftp->data = data_close(ftp, data);
ftp              2005 ext/ftp/ftp.c  ftp_nb_put(ftpbuf_t *ftp, const char *path, php_stream *instream, ftptype_t type, zend_long startpos)
ftp              2010 ext/ftp/ftp.c  	if (ftp == NULL) {
ftp              2013 ext/ftp/ftp.c  	if (!ftp_type(ftp, type)) {
ftp              2016 ext/ftp/ftp.c  	if ((data = ftp_getdata(ftp)) == NULL) {
ftp              2021 ext/ftp/ftp.c  		if (!ftp_putcmd(ftp, "REST", arg)) {
ftp              2024 ext/ftp/ftp.c  		if (!ftp_getresp(ftp) || (ftp->resp != 350)) {
ftp              2029 ext/ftp/ftp.c  	if (!ftp_putcmd(ftp, "STOR", path)) {
ftp              2032 ext/ftp/ftp.c  	if (!ftp_getresp(ftp) || (ftp->resp != 150 && ftp->resp != 125)) {
ftp              2035 ext/ftp/ftp.c  	if ((data = data_accept(data, ftp)) == NULL) {
ftp              2038 ext/ftp/ftp.c  	ftp->data = data;
ftp              2039 ext/ftp/ftp.c  	ftp->stream = instream;
ftp              2040 ext/ftp/ftp.c  	ftp->lastch = 0;
ftp              2041 ext/ftp/ftp.c  	ftp->nb = 1;
ftp              2043 ext/ftp/ftp.c  	return (ftp_nb_continue_write(ftp));
ftp              2046 ext/ftp/ftp.c  	ftp->data = data_close(ftp, data);
ftp              2055 ext/ftp/ftp.c  ftp_nb_continue_write(ftpbuf_t *ftp)
ftp              2062 ext/ftp/ftp.c  	if (!data_writeable(ftp, ftp->data->fd)) {
ftp              2067 ext/ftp/ftp.c  	ptr = ftp->data->buf;
ftp              2068 ext/ftp/ftp.c  	while (!php_stream_eof(ftp->stream) && (ch = php_stream_getc(ftp->stream)) != EOF) {
ftp              2070 ext/ftp/ftp.c  		if (ch == '\n' && ftp->type == FTPTYPE_ASCII) {
ftp              2080 ext/ftp/ftp.c  			if (my_send(ftp, ftp->data->fd, ftp->data->buf, size) != size) {
ftp              2087 ext/ftp/ftp.c  	if (size && my_send(ftp, ftp->data->fd, ftp->data->buf, size) != size) {
ftp              2090 ext/ftp/ftp.c  	ftp->data = data_close(ftp, ftp->data);
ftp              2092 ext/ftp/ftp.c  	if (!ftp_getresp(ftp) || (ftp->resp != 226 && ftp->resp != 250)) {
ftp              2095 ext/ftp/ftp.c  	ftp->nb = 0;
ftp              2098 ext/ftp/ftp.c  	ftp->data = data_close(ftp, ftp->data);
ftp              2099 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);
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  zend_string* 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 zend_long size, zend_string **response);
ftp               157 ext/ftp/ftp.h  char**		ftp_nlist(ftpbuf_t *ftp, const char *path);
ftp               164 ext/ftp/ftp.h  char**		ftp_list(ftpbuf_t *ftp, const char *path, int recursive);
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, zend_long resumepos);
ftp               179 ext/ftp/ftp.h  int		ftp_put(ftpbuf_t *ftp, const char *path, php_stream *instream, ftptype_t type, zend_long startpos);
ftp               182 ext/ftp/ftp.h  zend_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, zend_long resumepos);
ftp               204 ext/ftp/ftp.h  int		ftp_nb_put(ftpbuf_t *ftp, const char *path, php_stream *instream, ftptype_t type, zend_long startpos);
ftp               208 ext/ftp/ftp.h  int		ftp_nb_continue_read(ftpbuf_t *ftp);
ftp               212 ext/ftp/ftp.h  int		ftp_nb_continue_write(ftpbuf_t *ftp);
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               290 ext/ftp/php_ftp.c 	PHP_MINIT(ftp),
ftp               294 ext/ftp/php_ftp.c 	PHP_MINFO(ftp),
ftp               305 ext/ftp/php_ftp.c 	ftpbuf_t *ftp = (ftpbuf_t *)rsrc->ptr;
ftp               307 ext/ftp/php_ftp.c 	ftp_close(ftp);
ftp               310 ext/ftp/php_ftp.c PHP_MINIT_FUNCTION(ftp)
ftp               336 ext/ftp/php_ftp.c PHP_MINFO_FUNCTION(ftp)
ftp               361 ext/ftp/php_ftp.c 	ftpbuf_t	*ftp;
ftp               377 ext/ftp/php_ftp.c 	if (!(ftp = ftp_open(host, (short)port, timeout_sec))) {
ftp               382 ext/ftp/php_ftp.c 	ftp->autoseek = FTP_DEFAULT_AUTOSEEK;
ftp               383 ext/ftp/php_ftp.c 	ftp->usepasvaddress = FTP_DEFAULT_USEPASVADDRESS;
ftp               386 ext/ftp/php_ftp.c 	ftp->use_ssl = 0;
ftp               389 ext/ftp/php_ftp.c 	RETURN_RES(zend_register_resource(ftp, le_ftpbuf));
ftp               398 ext/ftp/php_ftp.c 	ftpbuf_t	*ftp;
ftp               414 ext/ftp/php_ftp.c 	if (!(ftp = ftp_open(host, (short)port, timeout_sec))) {
ftp               419 ext/ftp/php_ftp.c 	ftp->autoseek = FTP_DEFAULT_AUTOSEEK;
ftp               420 ext/ftp/php_ftp.c 	ftp->usepasvaddress = FTP_DEFAULT_USEPASVADDRESS;
ftp               422 ext/ftp/php_ftp.c 	ftp->use_ssl = 1;
ftp               424 ext/ftp/php_ftp.c 	RETURN_RES(zend_register_resource(ftp, le_ftpbuf));
ftp               434 ext/ftp/php_ftp.c 	ftpbuf_t	*ftp;
ftp               442 ext/ftp/php_ftp.c 	if ((ftp = (ftpbuf_t *)zend_fetch_resource(Z_RES_P(z_ftp), le_ftpbuf_name, le_ftpbuf)) == NULL) {
ftp               447 ext/ftp/php_ftp.c 	if (!ftp_login(ftp, user, pass)) {
ftp               448 ext/ftp/php_ftp.c 		php_error_docref(NULL, E_WARNING, "%s", ftp->inbuf);
ftp               461 ext/ftp/php_ftp.c 	ftpbuf_t	*ftp;
ftp               468 ext/ftp/php_ftp.c 	if ((ftp = (ftpbuf_t *)zend_fetch_resource(Z_RES_P(z_ftp), le_ftpbuf_name, le_ftpbuf)) == NULL) {
ftp               472 ext/ftp/php_ftp.c 	if (!(pwd = ftp_pwd(ftp))) {
ftp               473 ext/ftp/php_ftp.c 		php_error_docref(NULL, E_WARNING, "%s", ftp->inbuf);
ftp               486 ext/ftp/php_ftp.c 	ftpbuf_t	*ftp;
ftp               492 ext/ftp/php_ftp.c 	if ((ftp = (ftpbuf_t *)zend_fetch_resource(Z_RES_P(z_ftp), le_ftpbuf_name, le_ftpbuf)) == NULL) {
ftp               496 ext/ftp/php_ftp.c 	if (!ftp_cdup(ftp)) {
ftp               497 ext/ftp/php_ftp.c 		php_error_docref(NULL, E_WARNING, "%s", ftp->inbuf);
ftp               510 ext/ftp/php_ftp.c 	ftpbuf_t	*ftp;
ftp               518 ext/ftp/php_ftp.c 	if ((ftp = (ftpbuf_t *)zend_fetch_resource(Z_RES_P(z_ftp), le_ftpbuf_name, le_ftpbuf)) == NULL) {
ftp               523 ext/ftp/php_ftp.c 	if (!ftp_chdir(ftp, dir)) {
ftp               524 ext/ftp/php_ftp.c 		php_error_docref(NULL, E_WARNING, "%s", ftp->inbuf);
ftp               537 ext/ftp/php_ftp.c 	ftpbuf_t	*ftp;
ftp               545 ext/ftp/php_ftp.c 	if ((ftp = (ftpbuf_t *)zend_fetch_resource(Z_RES_P(z_ftp), le_ftpbuf_name, le_ftpbuf)) == NULL) {
ftp               550 ext/ftp/php_ftp.c 	if (!ftp_exec(ftp, cmd)) {
ftp               551 ext/ftp/php_ftp.c 		php_error_docref(NULL, E_WARNING, "%s", ftp->inbuf);
ftp               564 ext/ftp/php_ftp.c 	ftpbuf_t	*ftp;
ftp               572 ext/ftp/php_ftp.c 	if ((ftp = (ftpbuf_t *)zend_fetch_resource(Z_RES_P(z_ftp), le_ftpbuf_name, le_ftpbuf)) == NULL) {
ftp               577 ext/ftp/php_ftp.c 	ftp_raw(ftp, cmd, return_value);
ftp               586 ext/ftp/php_ftp.c 	ftpbuf_t	*ftp;
ftp               595 ext/ftp/php_ftp.c 	if ((ftp = (ftpbuf_t *)zend_fetch_resource(Z_RES_P(z_ftp), le_ftpbuf_name, le_ftpbuf)) == NULL) {
ftp               600 ext/ftp/php_ftp.c 	if (NULL == (tmp = ftp_mkdir(ftp, dir))) {
ftp               601 ext/ftp/php_ftp.c 		php_error_docref(NULL, E_WARNING, "%s", ftp->inbuf);
ftp               614 ext/ftp/php_ftp.c 	ftpbuf_t	*ftp;
ftp               622 ext/ftp/php_ftp.c 	if ((ftp = (ftpbuf_t *)zend_fetch_resource(Z_RES_P(z_ftp), le_ftpbuf_name, le_ftpbuf)) == NULL) {
ftp               627 ext/ftp/php_ftp.c 	if (!ftp_rmdir(ftp, dir)) {
ftp               628 ext/ftp/php_ftp.c 		php_error_docref(NULL, E_WARNING, "%s", ftp->inbuf);
ftp               641 ext/ftp/php_ftp.c 	ftpbuf_t	*ftp;
ftp               650 ext/ftp/php_ftp.c 	if ((ftp = (ftpbuf_t *)zend_fetch_resource(Z_RES_P(z_ftp), le_ftpbuf_name, le_ftpbuf)) == NULL) {
ftp               654 ext/ftp/php_ftp.c 	if (!ftp_chmod(ftp, mode, filename, filename_len)) {
ftp               655 ext/ftp/php_ftp.c 		php_error_docref(NULL, E_WARNING, "%s", ftp->inbuf);
ftp               668 ext/ftp/php_ftp.c 	ftpbuf_t	*ftp;
ftp               676 ext/ftp/php_ftp.c 	if ((ftp = (ftpbuf_t *)zend_fetch_resource(Z_RES_P(z_ftp), le_ftpbuf_name, le_ftpbuf)) == NULL) {
ftp               680 ext/ftp/php_ftp.c 	ret = ftp_alloc(ftp, size, zresponse ? &response : NULL);
ftp               699 ext/ftp/php_ftp.c 	ftpbuf_t	*ftp;
ftp               707 ext/ftp/php_ftp.c 	if ((ftp = (ftpbuf_t *)zend_fetch_resource(Z_RES_P(z_ftp), le_ftpbuf_name, le_ftpbuf)) == NULL) {
ftp               712 ext/ftp/php_ftp.c 	if (NULL == (nlist = ftp_nlist(ftp, dir))) {
ftp               729 ext/ftp/php_ftp.c 	ftpbuf_t	*ftp;
ftp               738 ext/ftp/php_ftp.c 	if ((ftp = (ftpbuf_t *)zend_fetch_resource(Z_RES_P(z_ftp), le_ftpbuf_name, le_ftpbuf)) == NULL) {
ftp               743 ext/ftp/php_ftp.c 	if (NULL == (llist = ftp_list(ftp, dir, recursive))) {
ftp               760 ext/ftp/php_ftp.c 	ftpbuf_t	*ftp;
ftp               767 ext/ftp/php_ftp.c 	if ((ftp = (ftpbuf_t *)zend_fetch_resource(Z_RES_P(z_ftp), le_ftpbuf_name, le_ftpbuf)) == NULL) {
ftp               771 ext/ftp/php_ftp.c 	if (NULL == (syst = ftp_syst(ftp))) {
ftp               772 ext/ftp/php_ftp.c 		php_error_docref(NULL, E_WARNING, "%s", ftp->inbuf);
ftp               785 ext/ftp/php_ftp.c 	ftpbuf_t	*ftp;
ftp               796 ext/ftp/php_ftp.c 	if ((ftp = (ftpbuf_t *)zend_fetch_resource(Z_RES_P(z_ftp), le_ftpbuf_name, le_ftpbuf)) == NULL) {
ftp               803 ext/ftp/php_ftp.c 	if (!ftp->autoseek && resumepos == PHP_FTP_AUTORESUME) {
ftp               807 ext/ftp/php_ftp.c 	if (ftp->autoseek && resumepos) {
ftp               817 ext/ftp/php_ftp.c 	if (!ftp_get(ftp, stream, file, xtype, resumepos)) {
ftp               818 ext/ftp/php_ftp.c 		php_error_docref(NULL, E_WARNING, "%s", ftp->inbuf);
ftp               831 ext/ftp/php_ftp.c 	ftpbuf_t	*ftp;
ftp               842 ext/ftp/php_ftp.c 	if ((ftp = (ftpbuf_t *)zend_fetch_resource(Z_RES_P(z_ftp), le_ftpbuf_name, le_ftpbuf)) == NULL) {
ftp               849 ext/ftp/php_ftp.c 	if (!ftp->autoseek && resumepos == PHP_FTP_AUTORESUME) {
ftp               853 ext/ftp/php_ftp.c 	if (ftp->autoseek && resumepos) {
ftp               864 ext/ftp/php_ftp.c 	ftp->direction = 0;   /* recv */
ftp               865 ext/ftp/php_ftp.c 	ftp->closestream = 0; /* do not close */
ftp               867 ext/ftp/php_ftp.c 	if ((ret = ftp_nb_get(ftp, stream, file, xtype, resumepos)) == PHP_FTP_FAILED) {
ftp               868 ext/ftp/php_ftp.c 		php_error_docref(NULL, E_WARNING, "%s", ftp->inbuf);
ftp               881 ext/ftp/php_ftp.c 	ftpbuf_t	*ftp;
ftp               888 ext/ftp/php_ftp.c 	if ((ftp = (ftpbuf_t *)zend_fetch_resource(Z_RES_P(z_ftp), le_ftpbuf_name, le_ftpbuf)) == NULL) {
ftp               892 ext/ftp/php_ftp.c 	if (!ftp_pasv(ftp, pasv ? 1 : 0)) {
ftp               905 ext/ftp/php_ftp.c 	ftpbuf_t	*ftp;
ftp               916 ext/ftp/php_ftp.c 	if ((ftp = (ftpbuf_t *)zend_fetch_resource(Z_RES_P(z_ftp), le_ftpbuf_name, le_ftpbuf)) == NULL) {
ftp               922 ext/ftp/php_ftp.c 	if (!ftp->autoseek && resumepos == PHP_FTP_AUTORESUME) {
ftp               930 ext/ftp/php_ftp.c 	if (ftp->autoseek && resumepos) {
ftp               953 ext/ftp/php_ftp.c 	if (!ftp_get(ftp, outstream, remote, xtype, resumepos)) {
ftp               956 ext/ftp/php_ftp.c 		php_error_docref(NULL, E_WARNING, "%s", ftp->inbuf);
ftp               970 ext/ftp/php_ftp.c 	ftpbuf_t	*ftp;
ftp               982 ext/ftp/php_ftp.c 	if ((ftp = (ftpbuf_t *)zend_fetch_resource(Z_RES_P(z_ftp), le_ftpbuf_name, le_ftpbuf)) == NULL) {
ftp               988 ext/ftp/php_ftp.c 	if (!ftp->autoseek && resumepos == PHP_FTP_AUTORESUME) {
ftp               994 ext/ftp/php_ftp.c 	if (ftp->autoseek && resumepos) {
ftp              1018 ext/ftp/php_ftp.c 	ftp->direction = 0;   /* recv */
ftp              1019 ext/ftp/php_ftp.c 	ftp->closestream = 1; /* do close */
ftp              1021 ext/ftp/php_ftp.c 	if ((ret = ftp_nb_get(ftp, outstream, remote, xtype, resumepos)) == PHP_FTP_FAILED) {
ftp              1023 ext/ftp/php_ftp.c 		ftp->stream = NULL;
ftp              1025 ext/ftp/php_ftp.c 		php_error_docref(NULL, E_WARNING, "%s", ftp->inbuf);
ftp              1031 ext/ftp/php_ftp.c 		ftp->stream = NULL;
ftp              1043 ext/ftp/php_ftp.c 	ftpbuf_t	*ftp;
ftp              1050 ext/ftp/php_ftp.c 	if ((ftp = (ftpbuf_t *)zend_fetch_resource(Z_RES_P(z_ftp), le_ftpbuf_name, le_ftpbuf)) == NULL) {
ftp              1054 ext/ftp/php_ftp.c 	if (!ftp->nb) {
ftp              1059 ext/ftp/php_ftp.c 	if (ftp->direction) {
ftp              1060 ext/ftp/php_ftp.c 		ret=ftp_nb_continue_write(ftp);
ftp              1062 ext/ftp/php_ftp.c 		ret=ftp_nb_continue_read(ftp);
ftp              1065 ext/ftp/php_ftp.c 	if (ret != PHP_FTP_MOREDATA && ftp->closestream) {
ftp              1066 ext/ftp/php_ftp.c 		php_stream_close(ftp->stream);
ftp              1067 ext/ftp/php_ftp.c 		ftp->stream = NULL;
ftp              1071 ext/ftp/php_ftp.c 		php_error_docref(NULL, E_WARNING, "%s", ftp->inbuf);
ftp              1083 ext/ftp/php_ftp.c 	ftpbuf_t	*ftp;
ftp              1094 ext/ftp/php_ftp.c 	if ((ftp = (ftpbuf_t *)zend_fetch_resource(Z_RES_P(z_ftp), le_ftpbuf_name, le_ftpbuf)) == NULL) {
ftp              1101 ext/ftp/php_ftp.c 	if (!ftp->autoseek && startpos == PHP_FTP_AUTORESUME) {
ftp              1105 ext/ftp/php_ftp.c 	if (ftp->autoseek && startpos) {
ftp              1108 ext/ftp/php_ftp.c 			startpos = ftp_size(ftp, remote);
ftp              1118 ext/ftp/php_ftp.c 	if (!ftp_put(ftp, remote, stream, xtype, startpos)) {
ftp              1119 ext/ftp/php_ftp.c 		php_error_docref(NULL, E_WARNING, "%s", ftp->inbuf);
ftp              1132 ext/ftp/php_ftp.c 	ftpbuf_t	*ftp;
ftp              1144 ext/ftp/php_ftp.c 	if ((ftp = (ftpbuf_t *)zend_fetch_resource(Z_RES_P(z_ftp), le_ftpbuf_name, le_ftpbuf)) == NULL) {
ftp              1151 ext/ftp/php_ftp.c 	if (!ftp->autoseek && startpos == PHP_FTP_AUTORESUME) {
ftp              1155 ext/ftp/php_ftp.c 	if (ftp->autoseek && startpos) {
ftp              1158 ext/ftp/php_ftp.c 			startpos = ftp_size(ftp, remote);
ftp              1169 ext/ftp/php_ftp.c 	ftp->direction = 1;   /* send */
ftp              1170 ext/ftp/php_ftp.c 	ftp->closestream = 0; /* do not close */
ftp              1172 ext/ftp/php_ftp.c 	if (((ret = ftp_nb_put(ftp, remote, stream, xtype, startpos)) == PHP_FTP_FAILED)) {
ftp              1173 ext/ftp/php_ftp.c 		php_error_docref(NULL, E_WARNING, "%s", ftp->inbuf);
ftp              1187 ext/ftp/php_ftp.c 	ftpbuf_t	*ftp;
ftp              1198 ext/ftp/php_ftp.c 	if ((ftp = (ftpbuf_t *)zend_fetch_resource(Z_RES_P(z_ftp), le_ftpbuf_name, le_ftpbuf)) == NULL) {
ftp              1208 ext/ftp/php_ftp.c 	if (!ftp->autoseek && startpos == PHP_FTP_AUTORESUME) {
ftp              1212 ext/ftp/php_ftp.c 	if (ftp->autoseek && startpos) {
ftp              1215 ext/ftp/php_ftp.c 			startpos = ftp_size(ftp, remote);
ftp              1225 ext/ftp/php_ftp.c 	if (!ftp_put(ftp, remote, instream, xtype, startpos)) {
ftp              1227 ext/ftp/php_ftp.c 		php_error_docref(NULL, E_WARNING, "%s", ftp->inbuf);
ftp              1242 ext/ftp/php_ftp.c 	ftpbuf_t	*ftp;
ftp              1253 ext/ftp/php_ftp.c 	if ((ftp = (ftpbuf_t *)zend_fetch_resource(Z_RES_P(z_ftp), le_ftpbuf_name, le_ftpbuf)) == NULL) {
ftp              1263 ext/ftp/php_ftp.c 	if (!ftp->autoseek && startpos == PHP_FTP_AUTORESUME) {
ftp              1267 ext/ftp/php_ftp.c 	if (ftp->autoseek && startpos) {
ftp              1270 ext/ftp/php_ftp.c 			startpos = ftp_size(ftp, remote);
ftp              1281 ext/ftp/php_ftp.c 	ftp->direction = 1;   /* send */
ftp              1282 ext/ftp/php_ftp.c 	ftp->closestream = 1; /* do close */
ftp              1284 ext/ftp/php_ftp.c 	ret = ftp_nb_put(ftp, remote, instream, xtype, startpos);
ftp              1288 ext/ftp/php_ftp.c 		ftp->stream = NULL;
ftp              1292 ext/ftp/php_ftp.c 		php_error_docref(NULL, E_WARNING, "%s", ftp->inbuf);
ftp              1304 ext/ftp/php_ftp.c 	ftpbuf_t	*ftp;
ftp              1312 ext/ftp/php_ftp.c 	if ((ftp = (ftpbuf_t *)zend_fetch_resource(Z_RES_P(z_ftp), le_ftpbuf_name, le_ftpbuf)) == NULL) {
ftp              1317 ext/ftp/php_ftp.c 	RETURN_LONG(ftp_size(ftp, file));
ftp              1326 ext/ftp/php_ftp.c 	ftpbuf_t	*ftp;
ftp              1334 ext/ftp/php_ftp.c 	if ((ftp = (ftpbuf_t *)zend_fetch_resource(Z_RES_P(z_ftp), le_ftpbuf_name, le_ftpbuf)) == NULL) {
ftp              1339 ext/ftp/php_ftp.c 	RETURN_LONG(ftp_mdtm(ftp, file));
ftp              1348 ext/ftp/php_ftp.c 	ftpbuf_t	*ftp;
ftp              1356 ext/ftp/php_ftp.c 	if ((ftp = (ftpbuf_t *)zend_fetch_resource(Z_RES_P(z_ftp), le_ftpbuf_name, le_ftpbuf)) == NULL) {
ftp              1361 ext/ftp/php_ftp.c 	if (!ftp_rename(ftp, src, dest)) {
ftp              1362 ext/ftp/php_ftp.c 		php_error_docref(NULL, E_WARNING, "%s", ftp->inbuf);
ftp              1375 ext/ftp/php_ftp.c 	ftpbuf_t	*ftp;
ftp              1383 ext/ftp/php_ftp.c 	if ((ftp = (ftpbuf_t *)zend_fetch_resource(Z_RES_P(z_ftp), le_ftpbuf_name, le_ftpbuf)) == NULL) {
ftp              1388 ext/ftp/php_ftp.c 	if (!ftp_delete(ftp, file)) {
ftp              1389 ext/ftp/php_ftp.c 		php_error_docref(NULL, E_WARNING, "%s", ftp->inbuf);
ftp              1402 ext/ftp/php_ftp.c 	ftpbuf_t	*ftp;
ftp              1410 ext/ftp/php_ftp.c 	if ((ftp = (ftpbuf_t *)zend_fetch_resource(Z_RES_P(z_ftp), le_ftpbuf_name, le_ftpbuf)) == NULL) {
ftp              1415 ext/ftp/php_ftp.c 	if (!ftp_site(ftp, cmd)) {
ftp              1416 ext/ftp/php_ftp.c 		php_error_docref(NULL, E_WARNING, "%s", ftp->inbuf);
ftp              1429 ext/ftp/php_ftp.c 	ftpbuf_t	*ftp;
ftp              1435 ext/ftp/php_ftp.c 	if ((ftp = (ftpbuf_t *)zend_fetch_resource(Z_RES_P(z_ftp), le_ftpbuf_name, le_ftpbuf)) == NULL) {
ftp              1439 ext/ftp/php_ftp.c 	ftp_quit(ftp);
ftp              1451 ext/ftp/php_ftp.c 	ftpbuf_t	*ftp;
ftp              1457 ext/ftp/php_ftp.c 	if ((ftp = (ftpbuf_t *)zend_fetch_resource(Z_RES_P(z_ftp), le_ftpbuf_name, le_ftpbuf)) == NULL) {
ftp              1472 ext/ftp/php_ftp.c 			ftp->timeout_sec = Z_LVAL_P(z_value);
ftp              1481 ext/ftp/php_ftp.c 			ftp->autoseek = Z_TYPE_P(z_value) == IS_TRUE ? 1 : 0;
ftp              1490 ext/ftp/php_ftp.c 			ftp->usepasvaddress = Z_TYPE_P(z_value) == IS_TRUE ? 1 : 0;
ftp              1507 ext/ftp/php_ftp.c 	ftpbuf_t	*ftp;
ftp              1513 ext/ftp/php_ftp.c 	if ((ftp = (ftpbuf_t *)zend_fetch_resource(Z_RES_P(z_ftp), le_ftpbuf_name, le_ftpbuf)) == NULL) {
ftp              1519 ext/ftp/php_ftp.c 			RETURN_LONG(ftp->timeout_sec);
ftp              1522 ext/ftp/php_ftp.c 			RETURN_BOOL(ftp->autoseek);
ftp              1525 ext/ftp/php_ftp.c 			RETURN_BOOL(ftp->usepasvaddress);
ftp                38 ext/ftp/php_ftp.h PHP_MINIT_FUNCTION(ftp);
ftp                39 ext/ftp/php_ftp.h PHP_MINFO_FUNCTION(ftp);