mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-18 18:58:22 +00:00
Add cache bypass mode
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@4075 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -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);
|
||||
|
Reference in New Issue
Block a user