diff options
author | Miles Bader <miles@gnu.org> | 1997-09-02 22:31:06 +0000 |
---|---|---|
committer | Miles Bader <miles@gnu.org> | 1997-09-02 22:31:06 +0000 |
commit | b7f616615a7b65bb536802bcd1650d5bdb57bb37 (patch) | |
tree | dc710d66a784bc1525e3ddba1ae8c12015d19792 /libftpconn | |
parent | 2d40ebe2d900c6ec23885459dffb74111b114553 (diff) |
(ftp_conn_close):
Close CONN->actv_data_conn_queue if necessary.
(ftp_conn_open):
Set SIN_LEN field correctly.
Diffstat (limited to 'libftpconn')
-rw-r--r-- | libftpconn/open.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/libftpconn/open.c b/libftpconn/open.c index 2a1b1b98..93ab0ac8 100644 --- a/libftpconn/open.c +++ b/libftpconn/open.c @@ -187,7 +187,7 @@ ftp_conn_open (struct ftp_conn *conn) if (csock < 0) return errno; - ftp_addr.sin_len = conn->params->addr_len; + ftp_addr.sin_len = sizeof ftp_addr; ftp_addr.sin_family = conn->params->addr_type; ftp_addr.sin_addr = *(struct in_addr *)conn->params->addr; ftp_addr.sin_port = ftp_port; @@ -235,6 +235,9 @@ ftp_conn_close (struct ftp_conn *conn) if (conn->control >= 0) close (conn->control); conn->control = -1; + if (conn->actv_data_conn_queue >= 0) + close (conn->actv_data_conn_queue); + conn->actv_data_conn_queue = -1; if (conn->hooks && conn->hooks->closed) (* conn->hooks->closed) (conn); } |