mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-04 20:04:50 +00:00
Start moving in changes from my resolve-shadow-warnings branch. Going to do
this in pieces so the diffs are a little bit smaller and more reviewable. pbx/ and formats/ first. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@136298 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -469,13 +469,13 @@ static const struct ast_format au_f = {
|
|||||||
|
|
||||||
static int load_module(void)
|
static int load_module(void)
|
||||||
{
|
{
|
||||||
int index;
|
int i;
|
||||||
|
|
||||||
/* XXX better init ? */
|
/* XXX better init ? */
|
||||||
for (index = 0; index < ARRAY_LEN(ulaw_silence); index++)
|
for (i = 0; i < ARRAY_LEN(ulaw_silence); i++)
|
||||||
ulaw_silence[index] = AST_LIN2MU(0);
|
ulaw_silence[i] = AST_LIN2MU(0);
|
||||||
for (index = 0; index < ARRAY_LEN(alaw_silence); index++)
|
for (i = 0; i < ARRAY_LEN(alaw_silence); i++)
|
||||||
alaw_silence[index] = AST_LIN2A(0);
|
alaw_silence[i] = AST_LIN2A(0);
|
||||||
|
|
||||||
if ( ast_format_register(&pcm_f)
|
if ( ast_format_register(&pcm_f)
|
||||||
|| ast_format_register(&alaw_f)
|
|| ast_format_register(&alaw_f)
|
||||||
|
200
formats/msgsm.h
200
formats/msgsm.h
@@ -9,106 +9,106 @@ typedef unsigned char wav_byte;
|
|||||||
typedef unsigned int uword;
|
typedef unsigned int uword;
|
||||||
|
|
||||||
#define readGSM_33(c1) { \
|
#define readGSM_33(c1) { \
|
||||||
gsm_byte *c = (c1); \
|
gsm_byte *__c = (c1); \
|
||||||
LARc[0] = (*c++ & 0xF) << 2; /* 1 */ \
|
LARc[0] = (*__c++ & 0xF) << 2; /* 1 */ \
|
||||||
LARc[0] |= (*c >> 6) & 0x3; \
|
LARc[0] |= (*__c >> 6) & 0x3; \
|
||||||
LARc[1] = *c++ & 0x3F; \
|
LARc[1] = *__c++ & 0x3F; \
|
||||||
LARc[2] = (*c >> 3) & 0x1F; \
|
LARc[2] = (*__c >> 3) & 0x1F; \
|
||||||
LARc[3] = (*c++ & 0x7) << 2; \
|
LARc[3] = (*__c++ & 0x7) << 2; \
|
||||||
LARc[3] |= (*c >> 6) & 0x3; \
|
LARc[3] |= (*__c >> 6) & 0x3; \
|
||||||
LARc[4] = (*c >> 2) & 0xF; \
|
LARc[4] = (*__c >> 2) & 0xF; \
|
||||||
LARc[5] = (*c++ & 0x3) << 2; \
|
LARc[5] = (*__c++ & 0x3) << 2; \
|
||||||
LARc[5] |= (*c >> 6) & 0x3; \
|
LARc[5] |= (*__c >> 6) & 0x3; \
|
||||||
LARc[6] = (*c >> 3) & 0x7; \
|
LARc[6] = (*__c >> 3) & 0x7; \
|
||||||
LARc[7] = *c++ & 0x7; \
|
LARc[7] = *__c++ & 0x7; \
|
||||||
Nc[0] = (*c >> 1) & 0x7F; \
|
Nc[0] = (*__c >> 1) & 0x7F; \
|
||||||
bc[0] = (*c++ & 0x1) << 1; \
|
bc[0] = (*__c++ & 0x1) << 1; \
|
||||||
bc[0] |= (*c >> 7) & 0x1; \
|
bc[0] |= (*__c >> 7) & 0x1; \
|
||||||
Mc[0] = (*c >> 5) & 0x3; \
|
Mc[0] = (*__c >> 5) & 0x3; \
|
||||||
xmaxc[0] = (*c++ & 0x1F) << 1; \
|
xmaxc[0] = (*__c++ & 0x1F) << 1; \
|
||||||
xmaxc[0] |= (*c >> 7) & 0x1; \
|
xmaxc[0] |= (*__c >> 7) & 0x1; \
|
||||||
xmc[0] = (*c >> 4) & 0x7; \
|
xmc[0] = (*__c >> 4) & 0x7; \
|
||||||
xmc[1] = (*c >> 1) & 0x7; \
|
xmc[1] = (*__c >> 1) & 0x7; \
|
||||||
xmc[2] = (*c++ & 0x1) << 2; \
|
xmc[2] = (*__c++ & 0x1) << 2; \
|
||||||
xmc[2] |= (*c >> 6) & 0x3; \
|
xmc[2] |= (*__c >> 6) & 0x3; \
|
||||||
xmc[3] = (*c >> 3) & 0x7; \
|
xmc[3] = (*__c >> 3) & 0x7; \
|
||||||
xmc[4] = *c++ & 0x7; \
|
xmc[4] = *__c++ & 0x7; \
|
||||||
xmc[5] = (*c >> 5) & 0x7; \
|
xmc[5] = (*__c >> 5) & 0x7; \
|
||||||
xmc[6] = (*c >> 2) & 0x7; \
|
xmc[6] = (*__c >> 2) & 0x7; \
|
||||||
xmc[7] = (*c++ & 0x3) << 1; /* 10 */ \
|
xmc[7] = (*__c++ & 0x3) << 1; /* 10 */ \
|
||||||
xmc[7] |= (*c >> 7) & 0x1; \
|
xmc[7] |= (*__c >> 7) & 0x1; \
|
||||||
xmc[8] = (*c >> 4) & 0x7; \
|
xmc[8] = (*__c >> 4) & 0x7; \
|
||||||
xmc[9] = (*c >> 1) & 0x7; \
|
xmc[9] = (*__c >> 1) & 0x7; \
|
||||||
xmc[10] = (*c++ & 0x1) << 2; \
|
xmc[10] = (*__c++ & 0x1) << 2; \
|
||||||
xmc[10] |= (*c >> 6) & 0x3; \
|
xmc[10] |= (*__c >> 6) & 0x3; \
|
||||||
xmc[11] = (*c >> 3) & 0x7; \
|
xmc[11] = (*__c >> 3) & 0x7; \
|
||||||
xmc[12] = *c++ & 0x7; \
|
xmc[12] = *__c++ & 0x7; \
|
||||||
Nc[1] = (*c >> 1) & 0x7F; \
|
Nc[1] = (*__c >> 1) & 0x7F; \
|
||||||
bc[1] = (*c++ & 0x1) << 1; \
|
bc[1] = (*__c++ & 0x1) << 1; \
|
||||||
bc[1] |= (*c >> 7) & 0x1; \
|
bc[1] |= (*__c >> 7) & 0x1; \
|
||||||
Mc[1] = (*c >> 5) & 0x3; \
|
Mc[1] = (*__c >> 5) & 0x3; \
|
||||||
xmaxc[1] = (*c++ & 0x1F) << 1; \
|
xmaxc[1] = (*__c++ & 0x1F) << 1; \
|
||||||
xmaxc[1] |= (*c >> 7) & 0x1; \
|
xmaxc[1] |= (*__c >> 7) & 0x1; \
|
||||||
xmc[13] = (*c >> 4) & 0x7; \
|
xmc[13] = (*__c >> 4) & 0x7; \
|
||||||
xmc[14] = (*c >> 1) & 0x7; \
|
xmc[14] = (*__c >> 1) & 0x7; \
|
||||||
xmc[15] = (*c++ & 0x1) << 2; \
|
xmc[15] = (*__c++ & 0x1) << 2; \
|
||||||
xmc[15] |= (*c >> 6) & 0x3; \
|
xmc[15] |= (*__c >> 6) & 0x3; \
|
||||||
xmc[16] = (*c >> 3) & 0x7; \
|
xmc[16] = (*__c >> 3) & 0x7; \
|
||||||
xmc[17] = *c++ & 0x7; \
|
xmc[17] = *__c++ & 0x7; \
|
||||||
xmc[18] = (*c >> 5) & 0x7; \
|
xmc[18] = (*__c >> 5) & 0x7; \
|
||||||
xmc[19] = (*c >> 2) & 0x7; \
|
xmc[19] = (*__c >> 2) & 0x7; \
|
||||||
xmc[20] = (*c++ & 0x3) << 1; \
|
xmc[20] = (*__c++ & 0x3) << 1; \
|
||||||
xmc[20] |= (*c >> 7) & 0x1; \
|
xmc[20] |= (*__c >> 7) & 0x1; \
|
||||||
xmc[21] = (*c >> 4) & 0x7; \
|
xmc[21] = (*__c >> 4) & 0x7; \
|
||||||
xmc[22] = (*c >> 1) & 0x7; \
|
xmc[22] = (*__c >> 1) & 0x7; \
|
||||||
xmc[23] = (*c++ & 0x1) << 2; \
|
xmc[23] = (*__c++ & 0x1) << 2; \
|
||||||
xmc[23] |= (*c >> 6) & 0x3; \
|
xmc[23] |= (*__c >> 6) & 0x3; \
|
||||||
xmc[24] = (*c >> 3) & 0x7; \
|
xmc[24] = (*__c >> 3) & 0x7; \
|
||||||
xmc[25] = *c++ & 0x7; \
|
xmc[25] = *__c++ & 0x7; \
|
||||||
Nc[2] = (*c >> 1) & 0x7F; \
|
Nc[2] = (*__c >> 1) & 0x7F; \
|
||||||
bc[2] = (*c++ & 0x1) << 1; /* 20 */ \
|
bc[2] = (*__c++ & 0x1) << 1; /* 20 */ \
|
||||||
bc[2] |= (*c >> 7) & 0x1; \
|
bc[2] |= (*__c >> 7) & 0x1; \
|
||||||
Mc[2] = (*c >> 5) & 0x3; \
|
Mc[2] = (*__c >> 5) & 0x3; \
|
||||||
xmaxc[2] = (*c++ & 0x1F) << 1; \
|
xmaxc[2] = (*__c++ & 0x1F) << 1; \
|
||||||
xmaxc[2] |= (*c >> 7) & 0x1; \
|
xmaxc[2] |= (*__c >> 7) & 0x1; \
|
||||||
xmc[26] = (*c >> 4) & 0x7; \
|
xmc[26] = (*__c >> 4) & 0x7; \
|
||||||
xmc[27] = (*c >> 1) & 0x7; \
|
xmc[27] = (*__c >> 1) & 0x7; \
|
||||||
xmc[28] = (*c++ & 0x1) << 2; \
|
xmc[28] = (*__c++ & 0x1) << 2; \
|
||||||
xmc[28] |= (*c >> 6) & 0x3; \
|
xmc[28] |= (*__c >> 6) & 0x3; \
|
||||||
xmc[29] = (*c >> 3) & 0x7; \
|
xmc[29] = (*__c >> 3) & 0x7; \
|
||||||
xmc[30] = *c++ & 0x7; \
|
xmc[30] = *__c++ & 0x7; \
|
||||||
xmc[31] = (*c >> 5) & 0x7; \
|
xmc[31] = (*__c >> 5) & 0x7; \
|
||||||
xmc[32] = (*c >> 2) & 0x7; \
|
xmc[32] = (*__c >> 2) & 0x7; \
|
||||||
xmc[33] = (*c++ & 0x3) << 1; \
|
xmc[33] = (*__c++ & 0x3) << 1; \
|
||||||
xmc[33] |= (*c >> 7) & 0x1; \
|
xmc[33] |= (*__c >> 7) & 0x1; \
|
||||||
xmc[34] = (*c >> 4) & 0x7; \
|
xmc[34] = (*__c >> 4) & 0x7; \
|
||||||
xmc[35] = (*c >> 1) & 0x7; \
|
xmc[35] = (*__c >> 1) & 0x7; \
|
||||||
xmc[36] = (*c++ & 0x1) << 2; \
|
xmc[36] = (*__c++ & 0x1) << 2; \
|
||||||
xmc[36] |= (*c >> 6) & 0x3; \
|
xmc[36] |= (*__c >> 6) & 0x3; \
|
||||||
xmc[37] = (*c >> 3) & 0x7; \
|
xmc[37] = (*__c >> 3) & 0x7; \
|
||||||
xmc[38] = *c++ & 0x7; \
|
xmc[38] = *__c++ & 0x7; \
|
||||||
Nc[3] = (*c >> 1) & 0x7F; \
|
Nc[3] = (*__c >> 1) & 0x7F; \
|
||||||
bc[3] = (*c++ & 0x1) << 1; \
|
bc[3] = (*__c++ & 0x1) << 1; \
|
||||||
bc[3] |= (*c >> 7) & 0x1; \
|
bc[3] |= (*__c >> 7) & 0x1; \
|
||||||
Mc[3] = (*c >> 5) & 0x3; \
|
Mc[3] = (*__c >> 5) & 0x3; \
|
||||||
xmaxc[3] = (*c++ & 0x1F) << 1; \
|
xmaxc[3] = (*__c++ & 0x1F) << 1; \
|
||||||
xmaxc[3] |= (*c >> 7) & 0x1; \
|
xmaxc[3] |= (*__c >> 7) & 0x1; \
|
||||||
xmc[39] = (*c >> 4) & 0x7; \
|
xmc[39] = (*__c >> 4) & 0x7; \
|
||||||
xmc[40] = (*c >> 1) & 0x7; \
|
xmc[40] = (*__c >> 1) & 0x7; \
|
||||||
xmc[41] = (*c++ & 0x1) << 2; \
|
xmc[41] = (*__c++ & 0x1) << 2; \
|
||||||
xmc[41] |= (*c >> 6) & 0x3; \
|
xmc[41] |= (*__c >> 6) & 0x3; \
|
||||||
xmc[42] = (*c >> 3) & 0x7; \
|
xmc[42] = (*__c >> 3) & 0x7; \
|
||||||
xmc[43] = *c++ & 0x7; /* 30 */ \
|
xmc[43] = *__c++ & 0x7; /* 30 */ \
|
||||||
xmc[44] = (*c >> 5) & 0x7; \
|
xmc[44] = (*__c >> 5) & 0x7; \
|
||||||
xmc[45] = (*c >> 2) & 0x7; \
|
xmc[45] = (*__c >> 2) & 0x7; \
|
||||||
xmc[46] = (*c++ & 0x3) << 1; \
|
xmc[46] = (*__c++ & 0x3) << 1; \
|
||||||
xmc[46] |= (*c >> 7) & 0x1; \
|
xmc[46] |= (*__c >> 7) & 0x1; \
|
||||||
xmc[47] = (*c >> 4) & 0x7; \
|
xmc[47] = (*__c >> 4) & 0x7; \
|
||||||
xmc[48] = (*c >> 1) & 0x7; \
|
xmc[48] = (*__c >> 1) & 0x7; \
|
||||||
xmc[49] = (*c++ & 0x1) << 2; \
|
xmc[49] = (*__c++ & 0x1) << 2; \
|
||||||
xmc[49] |= (*c >> 6) & 0x3; \
|
xmc[49] |= (*__c >> 6) & 0x3; \
|
||||||
xmc[50] = (*c >> 3) & 0x7; \
|
xmc[50] = (*__c >> 3) & 0x7; \
|
||||||
xmc[51] = *c & 0x7; /* 33 */ \
|
xmc[51] = *__c & 0x7; /* 33 */ \
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void conv66(gsm_byte * d, wav_byte * c) {
|
static inline void conv66(gsm_byte * d, wav_byte * c) {
|
||||||
|
@@ -339,7 +339,7 @@ static struct dundi_ie {
|
|||||||
int ie;
|
int ie;
|
||||||
char *name;
|
char *name;
|
||||||
void (*dump)(char *output, int maxlen, void *value, int len);
|
void (*dump)(char *output, int maxlen, void *value, int len);
|
||||||
} ies[] = {
|
} infoelts[] = {
|
||||||
{ DUNDI_IE_EID, "ENTITY IDENT", dump_eid },
|
{ DUNDI_IE_EID, "ENTITY IDENT", dump_eid },
|
||||||
{ DUNDI_IE_CALLED_CONTEXT, "CALLED CONTEXT", dump_string },
|
{ DUNDI_IE_CALLED_CONTEXT, "CALLED CONTEXT", dump_string },
|
||||||
{ DUNDI_IE_CALLED_NUMBER, "CALLED NUMBER", dump_string },
|
{ DUNDI_IE_CALLED_NUMBER, "CALLED NUMBER", dump_string },
|
||||||
@@ -370,9 +370,9 @@ static struct dundi_ie {
|
|||||||
const char *dundi_ie2str(int ie)
|
const char *dundi_ie2str(int ie)
|
||||||
{
|
{
|
||||||
int x;
|
int x;
|
||||||
for (x=0;x<(int)sizeof(ies) / (int)sizeof(ies[0]); x++) {
|
for (x = 0; x < ARRAY_LEN(infoelts); x++) {
|
||||||
if (ies[x].ie == ie)
|
if (infoelts[x].ie == ie)
|
||||||
return ies[x].name;
|
return infoelts[x].name;
|
||||||
}
|
}
|
||||||
return "Unknown IE";
|
return "Unknown IE";
|
||||||
}
|
}
|
||||||
@@ -399,18 +399,18 @@ static void dump_ies(unsigned char *iedata, int spaces, int len)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
found = 0;
|
found = 0;
|
||||||
for (x=0;x<(int)sizeof(ies) / (int)sizeof(ies[0]); x++) {
|
for (x = 0; x < ARRAY_LEN(infoelts); x++) {
|
||||||
if (ies[x].ie == ie) {
|
if (infoelts[x].ie == ie) {
|
||||||
if (ies[x].dump) {
|
if (infoelts[x].dump) {
|
||||||
ies[x].dump(interp, (int)sizeof(interp), iedata + 2, ielen);
|
infoelts[x].dump(interp, (int)sizeof(interp), iedata + 2, ielen);
|
||||||
snprintf(tmp, (int)sizeof(tmp), " %s%-15.15s : %s\n", (spaces ? " " : "" ), ies[x].name, interp);
|
snprintf(tmp, (int)sizeof(tmp), " %s%-15.15s : %s\n", (spaces ? " " : "" ), infoelts[x].name, interp);
|
||||||
outputf(tmp);
|
outputf(tmp);
|
||||||
} else {
|
} else {
|
||||||
if (ielen)
|
if (ielen)
|
||||||
snprintf(interp, (int)sizeof(interp), "%d bytes", ielen);
|
snprintf(interp, (int)sizeof(interp), "%d bytes", ielen);
|
||||||
else
|
else
|
||||||
strcpy(interp, "Present");
|
strcpy(interp, "Present");
|
||||||
snprintf(tmp, (int)sizeof(tmp), " %s%-15.15s : %s\n", (spaces ? " " : "" ), ies[x].name, interp);
|
snprintf(tmp, (int)sizeof(tmp), " %s%-15.15s : %s\n", (spaces ? " " : "" ), infoelts[x].name, interp);
|
||||||
outputf(tmp);
|
outputf(tmp);
|
||||||
}
|
}
|
||||||
found++;
|
found++;
|
||||||
|
@@ -654,7 +654,6 @@ static char *complete_dialplan_add_include(struct ast_cli_args *a)
|
|||||||
} else if (a->pos == 4) { /* dialplan add include CTX _X_ */
|
} else if (a->pos == 4) { /* dialplan add include CTX _X_ */
|
||||||
/* complete as 'into' if context exists or we are unable to check */
|
/* complete as 'into' if context exists or we are unable to check */
|
||||||
char *context, *dupline;
|
char *context, *dupline;
|
||||||
struct ast_context *c;
|
|
||||||
const char *s = skip_words(a->line, 3); /* should not fail */
|
const char *s = skip_words(a->line, 3); /* should not fail */
|
||||||
|
|
||||||
if (a->n != 0) /* only once */
|
if (a->n != 0) /* only once */
|
||||||
@@ -674,8 +673,9 @@ static char *complete_dialplan_add_include(struct ast_cli_args *a)
|
|||||||
/* our fault, we can't check, so complete 'into' ... */
|
/* our fault, we can't check, so complete 'into' ... */
|
||||||
ret = strdup("into");
|
ret = strdup("into");
|
||||||
} else {
|
} else {
|
||||||
for (c = NULL; !ret && (c = ast_walk_contexts(c)); )
|
struct ast_context *ctx;
|
||||||
if (!strcmp(context, ast_get_context_name(c)))
|
for (ctx = NULL; !ret && (ctx = ast_walk_contexts(ctx)); )
|
||||||
|
if (!strcmp(context, ast_get_context_name(ctx)))
|
||||||
ret = strdup("into"); /* found */
|
ret = strdup("into"); /* found */
|
||||||
ast_unlock_contexts();
|
ast_unlock_contexts();
|
||||||
}
|
}
|
||||||
@@ -845,7 +845,7 @@ static char *handle_cli_dialplan_save(struct ast_cli_entry *e, int cmd, struct a
|
|||||||
/* walk all contexts */
|
/* walk all contexts */
|
||||||
for (c = NULL; (c = ast_walk_contexts(c)); ) {
|
for (c = NULL; (c = ast_walk_contexts(c)); ) {
|
||||||
int context_header_written = 0;
|
int context_header_written = 0;
|
||||||
struct ast_exten *e, *last_written_e = NULL;
|
struct ast_exten *ext, *last_written_e = NULL;
|
||||||
struct ast_include *i;
|
struct ast_include *i;
|
||||||
struct ast_ignorepat *ip;
|
struct ast_ignorepat *ip;
|
||||||
struct ast_sw *sw;
|
struct ast_sw *sw;
|
||||||
@@ -863,11 +863,11 @@ static char *handle_cli_dialplan_save(struct ast_cli_entry *e, int cmd, struct a
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* walk extensions ... */
|
/* walk extensions ... */
|
||||||
for (e = NULL; (e = ast_walk_context_extensions(c, e)); ) {
|
for (ext = NULL; (ext = ast_walk_context_extensions(c, ext)); ) {
|
||||||
struct ast_exten *p = NULL;
|
struct ast_exten *p = NULL;
|
||||||
|
|
||||||
/* fireout priorities */
|
/* fireout priorities */
|
||||||
while ( (p = ast_walk_extension_priorities(e, p)) ) {
|
while ( (p = ast_walk_extension_priorities(ext, p)) ) {
|
||||||
if (strcmp(ast_get_extension_registrar(p), registrar) != 0) /* not this source */
|
if (strcmp(ast_get_extension_registrar(p), registrar) != 0) /* not this source */
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
@@ -1139,7 +1139,7 @@ static int cache_lookup_internal(time_t now, struct dundi_request *req, char *ke
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int cache_lookup(struct dundi_request *req, dundi_eid *peer_eid, unsigned long crc32, int *lowexpiration)
|
static int cache_lookup(struct dundi_request *req, dundi_eid *peer_eid, unsigned long checksum, int *lowexpiration)
|
||||||
{
|
{
|
||||||
char key[256];
|
char key[256];
|
||||||
char eid_str[20];
|
char eid_str[20];
|
||||||
@@ -1155,7 +1155,7 @@ static int cache_lookup(struct dundi_request *req, dundi_eid *peer_eid, unsigned
|
|||||||
dundi_eid_to_str_short(eid_str, sizeof(eid_str), peer_eid);
|
dundi_eid_to_str_short(eid_str, sizeof(eid_str), peer_eid);
|
||||||
dundi_eid_to_str_short(eidroot_str, sizeof(eidroot_str), &req->root_eid);
|
dundi_eid_to_str_short(eidroot_str, sizeof(eidroot_str), &req->root_eid);
|
||||||
ast_eid_to_str(eid_str_full, sizeof(eid_str_full), peer_eid);
|
ast_eid_to_str(eid_str_full, sizeof(eid_str_full), peer_eid);
|
||||||
snprintf(key, sizeof(key), "%s/%s/%s/e%08lx", eid_str, req->number, req->dcontext, crc32);
|
snprintf(key, sizeof(key), "%s/%s/%s/e%08lx", eid_str, req->number, req->dcontext, checksum);
|
||||||
res |= cache_lookup_internal(now, req, key, eid_str_full, lowexpiration);
|
res |= cache_lookup_internal(now, req, key, eid_str_full, lowexpiration);
|
||||||
snprintf(key, sizeof(key), "%s/%s/%s/e%08lx", eid_str, req->number, req->dcontext, 0L);
|
snprintf(key, sizeof(key), "%s/%s/%s/e%08lx", eid_str, req->number, req->dcontext, 0L);
|
||||||
res |= cache_lookup_internal(now, req, key, eid_str_full, lowexpiration);
|
res |= cache_lookup_internal(now, req, key, eid_str_full, lowexpiration);
|
||||||
@@ -1170,7 +1170,7 @@ static int cache_lookup(struct dundi_request *req, dundi_eid *peer_eid, unsigned
|
|||||||
break;
|
break;
|
||||||
x++;
|
x++;
|
||||||
/* Check for hints */
|
/* Check for hints */
|
||||||
snprintf(key, sizeof(key), "hint/%s/%s/%s/e%08lx", eid_str, tmp, req->dcontext, crc32);
|
snprintf(key, sizeof(key), "hint/%s/%s/%s/e%08lx", eid_str, tmp, req->dcontext, checksum);
|
||||||
res2 |= cache_lookup_internal(now, req, key, eid_str_full, lowexpiration);
|
res2 |= cache_lookup_internal(now, req, key, eid_str_full, lowexpiration);
|
||||||
snprintf(key, sizeof(key), "hint/%s/%s/%s/e%08lx", eid_str, tmp, req->dcontext, 0L);
|
snprintf(key, sizeof(key), "hint/%s/%s/%s/e%08lx", eid_str, tmp, req->dcontext, 0L);
|
||||||
res2 |= cache_lookup_internal(now, req, key, eid_str_full, lowexpiration);
|
res2 |= cache_lookup_internal(now, req, key, eid_str_full, lowexpiration);
|
||||||
@@ -4640,11 +4640,11 @@ static int set_config(char *config_file, struct sockaddr_in* sin, int reload)
|
|||||||
} else if(sin->sin_port != last_port)
|
} else if(sin->sin_port != last_port)
|
||||||
ast_log(LOG_WARNING, "change to port ignored until next asterisk re-start\n");
|
ast_log(LOG_WARNING, "change to port ignored until next asterisk re-start\n");
|
||||||
} else if (!strcasecmp(v->name, "bindaddr")) {
|
} else if (!strcasecmp(v->name, "bindaddr")) {
|
||||||
struct hostent *hp;
|
struct hostent *hep;
|
||||||
struct ast_hostent he;
|
struct ast_hostent hent;
|
||||||
hp = ast_gethostbyname(v->value, &he);
|
hep = ast_gethostbyname(v->value, &hent);
|
||||||
if (hp) {
|
if (hep) {
|
||||||
memcpy(&sin->sin_addr, hp->h_addr, sizeof(sin->sin_addr));
|
memcpy(&sin->sin_addr, hep->h_addr, sizeof(sin->sin_addr));
|
||||||
} else
|
} else
|
||||||
ast_log(LOG_WARNING, "Invalid host/IP '%s'\n", v->value);
|
ast_log(LOG_WARNING, "Invalid host/IP '%s'\n", v->value);
|
||||||
} else if (!strcasecmp(v->name, "authdebug")) {
|
} else if (!strcasecmp(v->name, "authdebug")) {
|
||||||
|
Reference in New Issue
Block a user