From 0423e3b72b70bf1c709df7a2a3816fb27f71bb67 Mon Sep 17 00:00:00 2001 From: crichter Date: Thu, 29 Jun 2006 20:12:19 +0000 Subject: 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 --- channels/misdn_config.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'channels/misdn_config.c') 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)); -- cgit v1.2.3