summaryrefslogtreecommitdiff
path: root/src/http_proxy_client.c
diff options
context:
space:
mode:
authorJakub Sławiński2006-02-05 15:14:03 +0100
committerJoshua Judson Rosen2014-07-17 21:15:02 +0200
commitb457fec36399c1f7de093d5e92bb4fa453b79c86 (patch)
tree2084c9a78d40213015e6f10e3e9e01bc4c0c51f1 /src/http_proxy_client.c
parentUpdate copyright statements. (diff)
downloadapf-b457fec36399c1f7de093d5e92bb4fa453b79c86.tar.gz
v0.8
- Fixed: infinite loop after buffering message - Fixed: corrupt packets after closing connections in the stopped state - Fixed: bug in mapping user numbers between afclient and afserver - Fixed: premature close of the service connection - Fixed: invalid buffering when the connection is closing - Added: Multiple tunnels in one afclient<->afserver connection
Diffstat (limited to 'src/http_proxy_client.c')
-rw-r--r--src/http_proxy_client.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/http_proxy_client.c b/src/http_proxy_client.c
index b06f523..e801a73 100644
--- a/src/http_proxy_client.c
+++ b/src/http_proxy_client.c
@@ -38,6 +38,12 @@ typedef struct {
SSL_CTX* ctx;
} proxy_argT;
+/*
+ * Function name: clean_return
+ * Description: Closes the connection and exits the thread.
+ * Arguments: sockfd - the descriptor of the connection
+ */
+
static void
clean_return(int sockfd)
{
@@ -47,6 +53,12 @@ clean_return(int sockfd)
pthread_exit(NULL);
}
+/*
+ * Function name: http_proxy_client
+ * Description: Function responsible for the client part of the http proxy connection.
+ * Arguments: vptr - the structure with all the information needed for http proxy tunnel
+ */
+
void*
http_proxy_client(void *vptr)
{
@@ -519,6 +531,16 @@ http_proxy_client(void *vptr)
clean_return(conn.sockfd);
}
+/*
+ * Function name: initialize_http_proxy_client
+ * Description: Initializes the thread responsible for http proxy connection.
+ * Arguments: sockfd - the new connection descriptor will be stored here
+ * cr - the pointer to ClientRealm structure
+ * ctx - the pointer to SSL_CTX structure
+ * Returns: 0 - success,
+ * !0 - failure.
+ */
+
int
initialize_http_proxy_client(int* sockfd, ClientRealm* cr, SSL_CTX* ctx)
{