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/stats.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'src/stats.c') diff --git a/src/stats.c b/src/stats.c index 67d369b..152eccd 100644 --- a/src/stats.c +++ b/src/stats.c @@ -24,6 +24,13 @@ static signed long compressgained; +/* + * Function name: timeperiod + * Description: Returns the formatted time period string. + * Arguments: period - the time period + * Returns: The formatted time period string. + */ + char* timeperiod(time_t period) { @@ -44,18 +51,35 @@ timeperiod(time_t period) return timeper; } +/* + * Function name: addtocg + * Description: Adds the given number to the bytes gained by the use of compression. + * Arguments: amount - the number to add + */ + void addtocg(int amount) { compressgained += amount; } +/* + * Function name: getcg + * Description: Returns the number of bytes gained by the use of compression. + * Returns: The number of bytes gained by the use of compression. + */ + signed long getcg(void) { return compressgained; } +/* + * Function name: resetcg + * Description: Resets the counter of bytes gained by the use of compression. + */ + void resetcg(void) { -- cgit v1.1