diff options
author | Tilghman Lesher <tilghman@meg.abyt.es> | 2009-04-23 20:42:11 +0000 |
---|---|---|
committer | Tilghman Lesher <tilghman@meg.abyt.es> | 2009-04-23 20:42:11 +0000 |
commit | d6c48bc1344a3bfd829f3d0666d7fb2b939ae641 (patch) | |
tree | 0222cea4557e2b3bc99c437dfed6f46d5b3e3f23 | |
parent | ce6ebaef9712ef2f5d4cd6a717f13906f70364b7 (diff) |
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
-rw-r--r-- | main/pbx.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/main/pbx.c b/main/pbx.c index ff9a162d3..0c7105a09 100644 --- a/main/pbx.c +++ b/main/pbx.c @@ -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, "")); } |