diff options
author | Benny Prijono <bennylp@teluu.com> | 2008-02-22 11:10:17 +0000 |
---|---|---|
committer | Benny Prijono <bennylp@teluu.com> | 2008-02-22 11:10:17 +0000 |
commit | 5e9005a6ed8321e2a3d6cd307bafe5c6ca79eee3 (patch) | |
tree | 825983a1fde955b6914870b7ba9f4a767b8fb761 /pjsip/src/pjsip/sip_config.c | |
parent | eb962bb2cade592db6319e2004e06c9ac8ee2ae2 (diff) |
Ticket #7: Move PJSIP compile time configurations/settings (such as T1, T2 timers) to run-time (thanks Philippe Leuba)
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@1818 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjsip/src/pjsip/sip_config.c')
-rw-r--r-- | pjsip/src/pjsip/sip_config.c | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/pjsip/src/pjsip/sip_config.c b/pjsip/src/pjsip/sip_config.c new file mode 100644 index 00000000..e0913792 --- /dev/null +++ b/pjsip/src/pjsip/sip_config.c @@ -0,0 +1,41 @@ +/* $Id$ */ +/* + * Copyright (C) 2003-2007 Benny Prijono <benny@prijono.org> + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include <pjsip/sip_config.h> + +/* pjsip configuration instance, initialized with default values */ +PJ_DEF_DATA(pjsip_cfg_t) pjsip_sip_cfg_var = +{ + /* Transaction settings */ + { + PJSIP_MAX_TSX_COUNT, + PJSIP_T1_TIMEOUT, + PJSIP_T2_TIMEOUT, + PJSIP_T4_TIMEOUT, + PJSIP_TD_TIMEOUT + } +}; + + +#ifdef PJ_DLL +PJ_DEF(pjsip_cfg_t*) pjsip_cfg(void) +{ + return &pjsip_sip_cfg_var; +} +#endif |