diff options
author | David Troy <dave@popvox.com> | 2006-04-02 16:43:05 +0000 |
---|---|---|
committer | David Troy <dave@popvox.com> | 2006-04-02 16:43:05 +0000 |
commit | 08192d2b732eaaff203012c0acda210b40261885 (patch) | |
tree | 59c98652dec47199680095daf58ae14d1ffe9d8e /src/config.c | |
parent | 55a533edf2e466a34179e12bf36e239902aad5fc (diff) | |
download | astmanproxy-08192d2b732eaaff203012c0acda210b40261885.tar.gz astmanproxy-08192d2b732eaaff203012c0acda210b40261885.tar.xz astmanproxy-08192d2b732eaaff203012c0acda210b40261885.zip |
git-svn-id: http://svncommunity.digium.com/svn/astmanproxy/branches/1.20pre@58 f02b47b9-160a-0410-81a6-dc3441afb0ec
Diffstat (limited to 'src/config.c')
-rw-r--r-- | src/config.c | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/src/config.c b/src/config.c index 2ffdd1a..824043b 100644 --- a/src/config.c +++ b/src/config.c @@ -99,6 +99,12 @@ void *processline(char *s) { pc.asteriskwritetimeout = atoi(value); else if (!strcmp(name,"clientwritetimeout") ) pc.clientwritetimeout = atoi(value); + else if (!strcmp(name,"sslclienthellotimeout") ) + pc.sslclhellotimeout = atoi(value); + else if (!strcmp(name,"acceptencryptedconnection") ) + pc.acceptencryptedconnection = strcmp(value,"yes") ? 0 : 1; + else if (!strcmp(name,"acceptunencryptedconnection") ) + pc.acceptunencryptedconnection = strcmp(value,"yes") ? 0 : 1; else if (!strcmp(name,"proxykey") ) strcpy(pc.key, value); else if (!strcmp(name,"proc_user") ) @@ -207,6 +213,12 @@ int ReadConfig() { memset( &pc, 0, sizeof pc ); + + /* Set nonzero config defaults */ + pc.asteriskwritetimeout = 100; + pc.clientwritetimeout = 100; + pc.sslclhellotimeout = 200; + sprintf(cfn, "%s/%s", CDIR, CFILE); FP = fopen( cfn, "r" ); @@ -226,10 +238,6 @@ int ReadConfig() { fclose(FP); - if (!pc.asteriskwritetimeout) - pc.asteriskwritetimeout = 100; - if (!pc.clientwritetimeout) - pc.clientwritetimeout = 100; return 0; } |