From 63bbc710b23893742e5ccbd430f95bf2d29c2da6 Mon Sep 17 00:00:00 2001 From: Jakub Sławiński Date: Thu, 3 Nov 2005 20:37:56 +0100 Subject: v0.7.4 - Fixed: sockets in CLOSE_WAIT state left by afclient - Added: --localname and --localport options - Added: --localdesname option - Added: kicking user in 'opening' state - Fixed: info about kicked user - Fixed: TERM signal handling - Fixed: id lost after reconnection - Fixed: printing wrong client name in 'SSL_accept failed (timeout)' message - Fixed: ignored 'certificate' and 'key' options from config file - Added: config files for afclient - Modified: some options in afserver config file --- src/http_proxy_client.c | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) (limited to 'src/http_proxy_client.c') diff --git a/src/http_proxy_client.c b/src/http_proxy_client.c index 9f0cc7c..6880d73 100644 --- a/src/http_proxy_client.c +++ b/src/http_proxy_client.c @@ -136,7 +136,7 @@ http_proxy_client(void *vptr) /* postfd */ aflog(LOG_T_MAIN, LOG_I_DEBUG, "http%s proxy: connecting (postfd)...", name); - if (ip_connect(&tmp, proxyname, proxyport, type)) { + if (ip_connect(&tmp, proxyname, proxyport, type, NULL, NULL)) { clean_return(conn.sockfd); } SslFd_set_fd(conn.postFd, tmp); @@ -180,7 +180,7 @@ http_proxy_client(void *vptr) /* getfd */ aflog(LOG_T_MAIN, LOG_I_DEBUG, "http%s proxy: connecting (getfd)...", name); - if (ip_connect(&tmp, proxyname, proxyport, type)) { + if (ip_connect(&tmp, proxyname, proxyport, type, NULL, NULL)) { clean_return(conn.sockfd); } SslFd_set_fd(conn.getFd, tmp); @@ -264,7 +264,7 @@ http_proxy_client(void *vptr) /* postfd */ aflog(LOG_T_MAIN, LOG_I_DEBUG, "http%s proxy: connecting (postfd)...", name); - if (ip_connect(&tmp, proxyname, proxyport, type)) { + if (ip_connect(&tmp, proxyname, proxyport, type, NULL, NULL)) { clean_return(conn.sockfd); } SslFd_set_fd(conn.postFd, tmp); @@ -327,7 +327,7 @@ http_proxy_client(void *vptr) /* postfd */ aflog(LOG_T_MAIN, LOG_I_DEBUG, "http%s proxy: connecting (postfd)...", name); - if (ip_connect(&tmp, proxyname, proxyport, type)) { + if (ip_connect(&tmp, proxyname, proxyport, type, NULL, NULL)) { clean_return(conn.sockfd); } SslFd_set_fd(conn.postFd, tmp); @@ -367,7 +367,7 @@ http_proxy_client(void *vptr) /* postfd */ aflog(LOG_T_MAIN, LOG_I_DEBUG, "http%s proxy: connecting (postfd)...", name); - if (ip_connect(&tmp, proxyname, proxyport, type)) { + if (ip_connect(&tmp, proxyname, proxyport, type, NULL, NULL)) { clean_return(conn.sockfd); } SslFd_set_fd(conn.postFd, tmp); @@ -441,7 +441,7 @@ http_proxy_client(void *vptr) /* getfd */ aflog(LOG_T_MAIN, LOG_I_DEBUG, "http%s proxy: connecting (getfd)...", name); - if (ip_connect(&tmp, proxyname, proxyport, type)) { + if (ip_connect(&tmp, proxyname, proxyport, type, NULL, NULL)) { clean_return(conn.sockfd); } SslFd_set_fd(conn.getFd, tmp); @@ -520,8 +520,7 @@ http_proxy_client(void *vptr) } int -initialize_http_proxy_client(int* sockfd, const char *host, const char *serv, - HttpProxyOptions* hpo, const char type, SSL_CTX* ctx) +initialize_http_proxy_client(int* sockfd, ClientRealm* cr, SSL_CTX* ctx) { int retval; int sockets[2]; @@ -533,16 +532,16 @@ initialize_http_proxy_client(int* sockfd, const char *host, const char *serv, } (*sockfd) = sockets[0]; - if (HttpProxyOptions_get_proxyname(hpo) == NULL) { + if (HttpProxyOptions_get_proxyname(ClientRealm_get_httpProxyOptions(cr)) == NULL) { return 1; } start_critical_section(); - arg.host = (char*) host; - arg.serv = (char*) serv; - arg.hpo = hpo; - arg.type = (char) type; + arg.host = ClientRealm_get_serverName(cr); + arg.serv = ClientRealm_get_managePort(cr); + arg.hpo = ClientRealm_get_httpProxyOptions(cr); + arg.type = ClientRealm_get_ipFamily(cr); arg.sockfd = sockets[1]; arg.ctx = ctx; -- cgit v1.1