summaryrefslogtreecommitdiff
path: root/src/http_proxy_client.c
diff options
context:
space:
mode:
authorJakub Sławiński2005-11-03 20:37:56 +0100
committerJoshua Judson Rosen2014-07-17 21:15:00 +0200
commit63bbc710b23893742e5ccbd430f95bf2d29c2da6 (patch)
tree06d0585724cff8a4f1a7c052b5b89fd12c404094 /src/http_proxy_client.c
parentv0.7.2 (diff)
downloadapf-63bbc710b23893742e5ccbd430f95bf2d29c2da6.tar.gz
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
Diffstat (limited to 'src/http_proxy_client.c')
-rw-r--r--src/http_proxy_client.c25
1 files changed, 12 insertions, 13 deletions
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;