diff --git a/client.c b/client.c index e8bd915a..805f486b 100644 --- a/client.c +++ b/client.c @@ -22,7 +22,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. int sock = -1; char *outputtemplate = NULL; int returnMultiVars = 0; -int timeout = 3000; /* default 3000 ms request timeout */ +int dnatimeout = 3000; /* default 3000 ms request timeout */ /* Now that we are using the keyring, we only support a small subset of variables. (VAR_NAME is not properly supported yet) @@ -119,15 +119,15 @@ int packetSendRequest(int method,unsigned char *packet,int packet_len,int batchP peer_low=0; peer_high=peer_count-1; /* If there are too many peers to allow sending to each three times, then we should adjust our incremental timeout accordingly, so far as is practicable */ - if (this_timeout*peer_count*3>timeout) + if (this_timeout*peer_count*3>dnatimeout) { - this_timeout=timeout/(3*peer_count); + this_timeout=dnatimeout/(3*peer_count); if (this_timeout<10) this_timeout=10; /* 10ms minimum sending interval */ } } else { peer_low=-1; peer_high=-1;} - while(cumulative_timeout<=timeout) + while(cumulative_timeout<=dnatimeout) { /* If not in serial mode, then send request to everyone immediately. Make sure we only ask once in parallel mode, since it will always ask everyone */ diff --git a/dna.c b/dna.c index afc10480..df015a94 100644 --- a/dna.c +++ b/dna.c @@ -164,7 +164,7 @@ int parseOldCommandLine(int argc, char **argv) sid=strdup(optarg); break; case 't': /* request timeout (ms) */ - timeout=atoi(optarg); + dnatimeout=atoi(optarg); break; case 'v': /* set verbosity */ debug |= debugFlagMask(optarg); diff --git a/serval.h b/serval.h index b9b368bf..8306f4dd 100755 --- a/serval.h +++ b/serval.h @@ -138,7 +138,7 @@ struct in_addr { #define MAX_DATA_BYTES 256 extern int debug; -extern int timeout; +extern int dnatimeout; extern int hlr_size; extern unsigned char *hlr;