aboutsummaryrefslogtreecommitdiffstats
path: root/channels/misdn_config.c
diff options
context:
space:
mode:
authorcrichter <crichter@f38db490-d61c-443f-a65b-d21fe96a405b>2006-06-29 20:12:19 +0000
committercrichter <crichter@f38db490-d61c-443f-a65b-d21fe96a405b>2006-06-29 20:12:19 +0000
commit0423e3b72b70bf1c709df7a2a3816fb27f71bb67 (patch)
tree6b52348696c84093902454a4845d752f81a7d026 /channels/misdn_config.c
parent78d0b626cc60f2a91d3b53c544063983ab8f5670 (diff)
added better L2 handling for ptp, if it's down we don't try to call on that port in groupdial anymore, also we try to get it up then. Additionally added the configoptions ntdebugflags and ntdebugfile to debug the mISDNuser NT Stack (should have done that ages before..). isdn_lib.c compiles again.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@36298 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels/misdn_config.c')
-rw-r--r--channels/misdn_config.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/channels/misdn_config.c b/channels/misdn_config.c
index 502436258..369f20265 100644
--- a/channels/misdn_config.c
+++ b/channels/misdn_config.c
@@ -136,8 +136,9 @@ static const struct misdn_cfg_spec gen_spec[] = {
{ "dynamic_crypt", MISDN_GEN_DYNAMIC_CRYPT, MISDN_CTYPE_BOOL, "no", NONE },
{ "crypt_prefix", MISDN_GEN_CRYPT_PREFIX, MISDN_CTYPE_STR, NO_DEFAULT, NONE },
{ "crypt_keys", MISDN_GEN_CRYPT_KEYS, MISDN_CTYPE_STR, NO_DEFAULT, NONE },
- { "l1watcher_timeout", MISDN_GEN_L1_TIMEOUT, MISDN_CTYPE_INT, "0", NONE }
-
+ { "l1watcher_timeout", MISDN_GEN_L1_TIMEOUT, MISDN_CTYPE_INT, "0", NONE },
+ { "ntdebugflags", MISDN_GEN_NTDEBUGFLAGS, MISDN_CTYPE_INT, "0", NONE },
+ { "ntdebugfile", MISDN_GEN_NTDEBUGFILE, MISDN_CTYPE_STR, "/var/log/misdn-nt.log", NONE }
};
/* array of port configs, default is at position 0. */
@@ -543,11 +544,18 @@ static int _parse (union misdn_cfg_pt *dest, char *value, enum misdn_cfg_type ty
}
break;
case MISDN_CTYPE_INT:
- if (sscanf(value, "%d", &tmp)) {
+ {
+ char *pat;
+ if (strchr(value,'x'))
+ pat="%x";
+ else
+ pat="%d";
+ if (sscanf(value, pat, &tmp)) {
dest->num = (int *)malloc(sizeof(int));
memcpy(dest->num, &tmp, sizeof(int));
} else
re = -1;
+ }
break;
case MISDN_CTYPE_BOOL:
dest->num = (int *)malloc(sizeof(int));