diff options
author | Jakub Sławiński | 2005-11-16 20:53:54 +0100 |
---|---|---|
committer | Joshua Judson Rosen | 2014-07-17 21:15:00 +0200 |
commit | e1c93eb660b5e628c0d3c2bbdaf82dc24c07da84 (patch) | |
tree | 6e53f7909e980171ec1951c370929234eda07a9a | |
parent | v0.7.4 (diff) | |
download | apf-e1c93eb660b5e628c0d3c2bbdaf82dc24c07da84.tar.gz |
v0.7.5
- Fixed: manageport option in the afclient config file
- Fixed: severe bug in string_cp
- Fixed: wrong connection type used by afclient when afserver used --nossl
or --nozlib option
- Fixed: broken keep-alive option
-rw-r--r-- | ChangeLog | 7 | ||||
-rw-r--r-- | NEWS | 10 | ||||
-rw-r--r-- | README | 2 | ||||
-rw-r--r-- | configure.ac | 4 | ||||
-rw-r--r-- | doc/afclient.1 | 2 | ||||
-rw-r--r-- | doc/afclient.conf.5 | 2 | ||||
-rw-r--r-- | doc/afserver.1 | 2 | ||||
-rw-r--r-- | doc/afserver.conf.5 | 2 | ||||
-rw-r--r-- | doc/en/README | 2 | ||||
-rw-r--r-- | src/activefor.h | 2 | ||||
-rw-r--r-- | src/afclient.c | 5 | ||||
-rw-r--r-- | src/afserver.c | 8 | ||||
-rw-r--r-- | src/file_client.c | 2 | ||||
-rw-r--r-- | src/server_check.c | 4 | ||||
-rw-r--r-- | src/server_set.c | 4 | ||||
-rw-r--r-- | src/string_functions.c | 4 |
16 files changed, 42 insertions, 20 deletions
@@ -1,3 +1,10 @@ +16.11.2005 (v0.7.5): + - Fixed: manageport option in the afclient config file + - Fixed: severe bug in string_cp + - Fixed: wrong connection type used by afclient when afserver used --nossl + or --nozlib option + - Fixed: broken keep-alive option + 03.11.2005 (v0.7.4): - Fixed: sockets in CLOSE_WAIT state left by afclient - Added: --localname and --localport options @@ -1,3 +1,13 @@ +16.11.2005: + * it's time for new release containing several bugfixes + +14.11.2005: + * small bugs has appeared due to severe code rewrites. They are + fixed as they come. + +07.11.2005: + * apf 0.7.4 is available on the gray-world.net + 03.07.2005: * a lot of code cleanups and modifications have been made in order to make sources more portable. APF compile under Solaris 10. @@ -1,4 +1,4 @@ -AF - Active Port Forwarder 0.7.4 - README +AF - Active Port Forwarder 0.7.5 - README Copyright (C) 2003,2004,2005 jeremian - <jeremian [at] poczta.fm> ================================================================= diff --git a/configure.ac b/configure.ac index 66d53ab..ae50dda 100644 --- a/configure.ac +++ b/configure.ac @@ -2,8 +2,8 @@ # Process this file with autoconf to produce a configure script. AC_PREREQ(2.59) -AC_INIT([Active port forwarder], [0.7.4], [jeremian@poczta.fm], [apf]) -AM_INIT_AUTOMAKE([apf], [0.7.4]) +AC_INIT([Active port forwarder], [0.7.5], [jeremian@poczta.fm], [apf]) +AM_INIT_AUTOMAKE([apf], [0.7.5]) AC_COPYRIGHT([ Copyright (C) 2003,2004,2005 jeremian - <jeremian [[at]] poczta.fm> =================== diff --git a/doc/afclient.1 b/doc/afclient.1 index 32c71ff..184b8ce 100644 --- a/doc/afclient.1 +++ b/doc/afclient.1 @@ -1,4 +1,4 @@ -.TH afclient 1 "apf 0.7.4" Jeremian +.TH afclient 1 "apf 0.7.5" Jeremian .SH NAME afclient \- active port forwarder client .SH SYNOPSIS diff --git a/doc/afclient.conf.5 b/doc/afclient.conf.5 index 6137428..1e3bbbe 100644 --- a/doc/afclient.conf.5 +++ b/doc/afclient.conf.5 @@ -1,4 +1,4 @@ -.TH afclient.conf 5 "apf 0.7.4" Jeremian +.TH afclient.conf 5 "apf 0.7.5" Jeremian .SH NAME afclient.conf \- Configuration File for afclient .SH INTRODUCTION diff --git a/doc/afserver.1 b/doc/afserver.1 index cb3d5f7..c048c10 100644 --- a/doc/afserver.1 +++ b/doc/afserver.1 @@ -1,4 +1,4 @@ -.TH afserver 1 "apf 0.7.4" Jeremian +.TH afserver 1 "apf 0.7.5" Jeremian .SH NAME afserver \- active port forwarder server .SH SYNOPSIS diff --git a/doc/afserver.conf.5 b/doc/afserver.conf.5 index a28625f..2e4f313 100644 --- a/doc/afserver.conf.5 +++ b/doc/afserver.conf.5 @@ -1,4 +1,4 @@ -.TH afserver.conf 5 "apf 0.7.4" Jeremian +.TH afserver.conf 5 "apf 0.7.5" Jeremian .SH NAME afserver.conf \- Configuration File for afserver .SH INTRODUCTION diff --git a/doc/en/README b/doc/en/README index c36ea47..6e1819b 100644 --- a/doc/en/README +++ b/doc/en/README @@ -1,4 +1,4 @@ -AF - Active Port Forwarder 0.7.4 - README +AF - Active Port Forwarder 0.7.5 - README Copyright (C) 2003,2004,2005 jeremian - <jeremian [at] poczta.fm> ================================================================= diff --git a/src/activefor.h b/src/activefor.h index 4fcdbe0..31284b9 100644 --- a/src/activefor.h +++ b/src/activefor.h @@ -51,7 +51,7 @@ #define S_STATE_STOPPED 11 #define S_STATE_OPENING_CLOSED 17 -#define AF_VER(info) info" v0.7.4" +#define AF_VER(info) info" v0.7.5" #define TYPE_TCP 1 #define TYPE_UDP 3 diff --git a/src/afclient.c b/src/afclient.c index b450543..a208bf6 100644 --- a/src/afclient.c +++ b/src/afclient.c @@ -87,7 +87,6 @@ main(int argc, char **argv) struct sockaddr* clientAddress; fd_set rset, allset, wset, tmpset; struct timeval keepAlive; - int timeout = 0; char verbose = 0; HttpProxyOptions* hpo = HttpProxyOptions_new(); char hpoUsed = 0; @@ -792,9 +791,9 @@ main(int argc, char **argv) aflog(LOG_T_INIT, LOG_I_INFO, "Trying to reconnect..."); mysleep(ArOptions_get_arDelay(ClientRealm_get_arOptions(pointer))); + ClientRealm_set_realmType(pointer, realmType); } if (temp == 0) { - ClientRealm_set_realmType(pointer, realmType); break; } } while (i); @@ -847,7 +846,7 @@ main(int argc, char **argv) buff[0] = AF_S_KEEP_ALIVE; SslFd_send_message(ClientRealm_get_realmType(pointer), ClientRealm_get_masterSslFd(pointer), buff, 5); - keepAlive.tv_sec = timeout; + keepAlive.tv_sec = ClientRealm_get_keepAliveTimeout(pointer); keepAlive.tv_usec = 0; ClientRealm_set_keepAlive(pointer, keepAlive); } diff --git a/src/afserver.c b/src/afserver.c index 2d6e1eb..fe532ec 100644 --- a/src/afserver.c +++ b/src/afserver.c @@ -108,7 +108,7 @@ main(int argc, char **argv) char* certif = NULL; char* keys = NULL; char* dateformat = NULL; - char* stemp = NULL; + static char* stemp = NULL; SSL_METHOD* method; SSL_CTX* ctx; @@ -1367,14 +1367,12 @@ main(int argc, char **argv) get_realmname(config, j), get_clientname(pointer, k)); if (ConnectClient_get_state(srClientsTable[k]) == CONNECTCLIENT_STATE_AUTHORIZING) { n = SslFd_get_message(ServerRealm_get_realmType(pointer) | TYPE_SSL | TYPE_ZLIB, - ConnectClient_get_sslFd( - srClientsTable[k]), + ConnectClient_get_sslFd(srClientsTable[k]), buff, (-1) * HeaderBuffer_to_read(ConnectClient_get_header(srClientsTable[k]))); } else { n = SslFd_get_message(ServerRealm_get_realmType(pointer), - ConnectClient_get_sslFd( - srClientsTable[k]), + ConnectClient_get_sslFd(srClientsTable[k]), buff, (-1) * HeaderBuffer_to_read(ConnectClient_get_header(srClientsTable[k]))); } if (n == -1) { diff --git a/src/file_client.c b/src/file_client.c index 68ece7a..58ee489 100644 --- a/src/file_client.c +++ b/src/file_client.c @@ -196,7 +196,7 @@ cparsefile(char* name, int* status) ClientRealm_set_serverName(ClientConfiguration_get_realmsTable(cfg)[0], helpbuf2); } else if ((strcmp(helpbuf1, "m") == 0) || (strcmp(helpbuf1, "manageport") == 0)) { - ClientRealm_set_hostName(ClientConfiguration_get_realmsTable(cfg)[0], helpbuf2); + ClientRealm_set_managePort(ClientConfiguration_get_realmsTable(cfg)[0], helpbuf2); } else if ((strcmp(helpbuf1, "d") == 0) || (strcmp(helpbuf1, "hostname") == 0)) { ClientRealm_set_hostName(ClientConfiguration_get_realmsTable(cfg)[0], helpbuf2); diff --git a/src/server_check.c b/src/server_check.c index eb65d97..858d28e 100644 --- a/src/server_check.c +++ b/src/server_check.c @@ -31,7 +31,8 @@ int check_value(char* what, char* info) { - long tmp = check_value_liberal(what, info); + long tmp; + tmp = check_value_liberal(what, info); if (tmp <= 0) { aflog(LOG_T_INIT, LOG_I_CRIT, @@ -46,6 +47,7 @@ check_value_liberal(char* what, char* info) { char* znak; long tmp; + if ((tmp = strtol(what, &znak, 10)) >= INT_MAX) { aflog(LOG_T_INIT, LOG_I_CRIT, "%s: %s\n", info, what); diff --git a/src/server_set.c b/src/server_set.c index c3a0058..3537cc5 100644 --- a/src/server_set.c +++ b/src/server_set.c @@ -20,12 +20,14 @@ #include <stdlib.h> +#include "string_functions.h" + void set_value(char** dest, char* from, char* def) { if ((*dest) == NULL) { if (from != NULL) { - (*dest) = from; + string_cp(dest, from); } else { (*dest) = def; diff --git a/src/string_functions.c b/src/string_functions.c index 471d3eb..58ee17e 100644 --- a/src/string_functions.c +++ b/src/string_functions.c @@ -45,6 +45,10 @@ string_cp(char** dest, char* src) /* 1. releasing memory allocated by *dest */ if (dest != NULL) { if ((*dest) != NULL) { + /* if *dest points to the same memory as src - we shouldn't do anything */ + if ((*dest) == src) { + return (*dest); + } free((*dest)); (*dest) = NULL; } |