From 1361f0e88138653d2437f45ddf940206ed0e93b7 Mon Sep 17 00:00:00 2001 From: Jakub Sławiński Date: Thu, 6 Apr 2006 23:34:51 +0200 Subject: v0.8.1 - Fixed: enableproxy option in server's config file - Added: clients idle time - Added: 'maxidle' option - Modified: task scheduling subsystem has been completely rewritten - Fixed: segmentation fault in http tunnels after multiple simultaneous POST connections from the same source - Fixed: unexpected connection close when http proxy was too slow - Fixed: SIGSEGV in http proxy mode under cygwin - Added: enabled the SO_KEEPALIVE option for all the sockets used by the apf - Added: 60 seconds timeout for SSL_connect --- src/connect_client_struct.c | 71 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 71 insertions(+) (limited to 'src/connect_client_struct.c') diff --git a/src/connect_client_struct.c b/src/connect_client_struct.c index 3481833..f5e713e 100644 --- a/src/connect_client_struct.c +++ b/src/connect_client_struct.c @@ -275,6 +275,23 @@ ConnectClient_set_connectTime(ConnectClient* cc, time_t connectTime) } /* + * Function name: ConnectClient_set_lastActivity + * Description: Sets time of the last client activity (when last packet from afclient has arrived) + * Arguments: cc - pointer to ConnectClient structure + * lastActivity - time of the last client activity + */ + +void +ConnectClient_set_lastActivity(ConnectClient* cc, time_t lastActivity) +{ + assert(cc != NULL); + if (cc == NULL) { + return; + } + cc->lastActivity = lastActivity; +} + +/* * Function name: ConnectClient_set_sClientId * Description: Sets client identification string. * Arguments: cc - pointer to ConnectClient structure @@ -403,6 +420,26 @@ ConnectClient_set_header(ConnectClient* cc, HeaderBuffer* hb) } /* + * Function name: ConnectClient_set_task + * Description: Sets the client task. + * Arguments: cc - pointer to ConnectClient structure + * task - the task to set + */ + +void +ConnectClient_set_task(ConnectClient* cc, Task* task) +{ + assert(cc != NULL); + if (cc == NULL) { + return; + } + if (cc->task) { + Task_free(&(cc->task)); + } + cc->task = task; +} + +/* * Function name: ConnectClient_get_state * Description: Gets state of the connected client. * Arguments: cc - pointer to ConnectClient structure @@ -573,6 +610,23 @@ ConnectClient_get_connectTime(ConnectClient* cc) } /* + * Function name: ConnectClient_get_lastActivity + * Description: Gets time of the last client activity (when last packet from afclient has arrived) + * Arguments: cc - pointer to ConnectClient structure + * Returns: Time of the last client activity. + */ + +time_t +ConnectClient_get_lastActivity(ConnectClient* cc) +{ + assert(cc != NULL); + if (cc == NULL) { + return 0; + } + return cc->lastActivity; +} + +/* * Function name: ConnectClient_get_sClientId * Description: Gets client identification string. * Arguments: cc - pointer to ConnectClient structure @@ -693,6 +747,23 @@ ConnectClient_get_header(ConnectClient* cc) } /* + * Function name: ConnectClient_get_task + * Description: Gets the client task. + * Arguments: cc - pointer to ConnectClient structure + * Returns: The client task. + */ + +Task* +ConnectClient_get_task(ConnectClient* cc) +{ + assert(cc != NULL); + if (cc == NULL) { + return NULL; + } + return cc->task; +} + +/* * Function name: ConnectClient_create_users * Description: Creates user descriptor table. Memory for the table is allocated according * to the previously set 'limit' value. All the descriptors are set to -1. -- cgit v1.1