Mercurial > gftp.yaz
comparison lib/rfc959.c @ 173:4c288d05b26a
2003-6-8 Brian Masney <masneyb@gftp.org>
* lib/bookmark.c lib/gftp.h lib/https.c lib/local.c lib/misc.c
lib/protocols.c lib/rfc2068.c lib/rfc959.c lib/sshv2.c
src/text/gftp-text.c src/gtk/gftp-gtk.c - made the init function for
all the protocols return an integer instead of nothing. If there was an
error setting up the protocol, GFTP_EFATAL should be returned and the
connection should be aborted. The HTTPS protocol uses this to return if
SSL support was not compiled in
* lib/protocols.c src/text/gftp-text.c src/gtk/dnd.c
src/gtk/gftp-gtk.c src/gtk/menu-items.c - have gftp_parse_url() log the
error messages to the user. This shouldn't have been done in the
individual ports
* lib/https.c - only initialize the SSL engine the first time a SSL
connection is made.
author | masneyb |
---|---|
date | Mon, 09 Jun 2003 00:53:20 +0000 |
parents | d40f9db52cdf |
children | aec4b4541d3a |
comparison
equal
deleted
inserted
replaced
172:9273b56e7529 | 173:4c288d05b26a |
---|---|
1596 char *proxy_config; | 1596 char *proxy_config; |
1597 | 1597 |
1598 gftp_lookup_request_option (request, "proxy_config", &proxy_config); | 1598 gftp_lookup_request_option (request, "proxy_config", &proxy_config); |
1599 if (strcmp (proxy_config, "http") == 0) | 1599 if (strcmp (proxy_config, "http") == 0) |
1600 { | 1600 { |
1601 gftp_protocols[GFTP_HTTP_NUM].init (request); | 1601 gftp_protocols[GFTP_HTTP_NUM].init (request); /* FIXME - check return value */ |
1602 | |
1602 gftp_set_request_option (request, "proxy_config", "ftp"); | 1603 gftp_set_request_option (request, "proxy_config", "ftp"); |
1603 } | 1604 } |
1604 } | 1605 } |
1605 | 1606 |
1606 | 1607 |
1629 gftp_set_global_option ("email", tempstr); | 1630 gftp_set_global_option ("email", tempstr); |
1630 } | 1631 } |
1631 } | 1632 } |
1632 | 1633 |
1633 | 1634 |
1634 void | 1635 int |
1635 rfc959_init (gftp_request * request) | 1636 rfc959_init (gftp_request * request) |
1636 { | 1637 { |
1637 rfc959_parms * parms; | 1638 rfc959_parms * parms; |
1638 | 1639 |
1639 g_return_if_fail (request != NULL); | 1640 g_return_val_if_fail (request != NULL, GFTP_EFATAL); |
1640 | 1641 |
1641 request->protonum = GFTP_FTP_NUM; | 1642 request->protonum = GFTP_FTP_NUM; |
1642 request->init = rfc959_init; | 1643 request->init = rfc959_init; |
1643 request->destroy = NULL; | 1644 request->destroy = NULL; |
1644 request->read_function = gftp_fd_read; | 1645 request->read_function = gftp_fd_read; |
1677 request->protocol_data = g_malloc0 (sizeof (rfc959_parms)); | 1678 request->protocol_data = g_malloc0 (sizeof (rfc959_parms)); |
1678 parms = request->protocol_data; | 1679 parms = request->protocol_data; |
1679 parms->data_connection = -1; | 1680 parms->data_connection = -1; |
1680 | 1681 |
1681 gftp_set_config_options (request); | 1682 gftp_set_config_options (request); |
1682 } | 1683 |
1683 | 1684 return (0); |
1685 } | |
1686 |