mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-16 14:58:25 +00:00
Labels are sometimes (most of the time?) NULL for extensions.
(closes issue #14895) Reported by: chris-mac Patches: 20090423__bug14895__2.diff.txt uploaded by tilghman (license 14) Tested by: lmadsen git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@190352 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -1031,7 +1031,7 @@ static int hashtab_compare_exten_labels(const void *ah_a, const void *ah_b)
|
||||
{
|
||||
const struct ast_exten *ac = ah_a;
|
||||
const struct ast_exten *bc = ah_b;
|
||||
return strcmp(ac->label, bc->label);
|
||||
return strcmp(S_OR(ac->label, ""), S_OR(bc->label, ""));
|
||||
}
|
||||
|
||||
unsigned int ast_hashtab_hash_contexts(const void *obj)
|
||||
@@ -1059,7 +1059,7 @@ static unsigned int hashtab_hash_priority(const void *obj)
|
||||
static unsigned int hashtab_hash_labels(const void *obj)
|
||||
{
|
||||
const struct ast_exten *ac = obj;
|
||||
return ast_hashtab_hash_string(ac->label);
|
||||
return ast_hashtab_hash_string(S_OR(ac->label, ""));
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user