From b457fec36399c1f7de093d5e92bb4fa453b79c86 Mon Sep 17 00:00:00 2001 From: Jakub Sławiński Date: Sun, 5 Feb 2006 15:14:03 +0100 Subject: 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 --- src/http_proxy_client.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'src/http_proxy_client.c') 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) { -- cgit v1.1