aboutsummaryrefslogtreecommitdiffstats
path: root/pbx/dundi-parser.c
diff options
context:
space:
mode:
authormarkster <markster@f38db490-d61c-443f-a65b-d21fe96a405b>2004-10-24 05:51:57 +0000
committermarkster <markster@f38db490-d61c-443f-a65b-d21fe96a405b>2004-10-24 05:51:57 +0000
commit0a95ef7a1692562f449ffcd7f3339ff299f11222 (patch)
tree919a32145b1901308333c1428715fadf082e4c1c /pbx/dundi-parser.c
parente39bbff418df27e0aaecf9980c7d2dda832b1664 (diff)
Add cache bypass mode
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@4075 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'pbx/dundi-parser.c')
-rwxr-xr-xpbx/dundi-parser.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/pbx/dundi-parser.c b/pbx/dundi-parser.c
index 99c74f88d..f9f96bcdb 100755
--- a/pbx/dundi-parser.c
+++ b/pbx/dundi-parser.c
@@ -115,6 +115,12 @@ static void dump_string(char *output, int maxlen, void *value, int len)
output[maxlen] = '\0';
}
+static void dump_cbypass(char *output, int maxlen, void *value, int len)
+{
+ strncpy(output, "Bypass Caches", maxlen);
+ output[maxlen] = '\0';
+}
+
static void dump_eid(char *output, int maxlen, void *value, int len)
{
if (len == 6)
@@ -358,6 +364,7 @@ static struct dundi_ie {
{ DUNDI_IE_EMAIL, "EMAIL", dump_string },
{ DUNDI_IE_PHONE, "PHONE", dump_string },
{ DUNDI_IE_IPADDR, "ADDRESS", dump_string },
+ { DUNDI_IE_CACHEBYPASS, "CBYPASS", dump_cbypass },
};
const char *dundi_ie2str(int ie)
@@ -380,7 +387,7 @@ static void dump_ies(unsigned char *iedata, int spaces, int len)
char tmp[1024];
if (len < 2)
return;
- while(len > 2) {
+ while(len >= 2) {
ie = iedata[0];
ielen = iedata[1];
/* Encrypted data is the remainder */
@@ -441,7 +448,8 @@ void dundi_showframe(struct dundi_hdr *fhi, int rx, struct sockaddr_in *sin, int
"REGRESPONSE ",
"CANCEL ",
"ENCRYPT ",
- "ENCREJ " };
+ "ENCREJ ",
+ "PRECACHE " };
char class2[20];
char *class;
char subclass2[20];
@@ -784,6 +792,9 @@ int dundi_parse_ies(struct dundi_ies *ies, unsigned char *data, int datalen)
errorf(tmp);
}
break;
+ case DUNDI_IE_CACHEBYPASS:
+ ies->cbypass = 1;
+ break;
default:
snprintf(tmp, (int)sizeof(tmp), "Ignoring unknown information element '%s' (%d) of length %d\n", dundi_ie2str(ie), ie, len);
outputf(tmp);