[asterisk-commits] tilghman: trunk r190352 - /trunk/main/pbx.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Thu Apr 23 15:42:15 CDT 2009


Author: tilghman
Date: Thu Apr 23 15:42:11 2009
New Revision: 190352

URL: http://svn.digium.com/svn-view/asterisk?view=rev&rev=190352
Log:
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

Modified:
    trunk/main/pbx.c

Modified: trunk/main/pbx.c
URL: http://svn.digium.com/svn-view/asterisk/trunk/main/pbx.c?view=diff&rev=190352&r1=190351&r2=190352
==============================================================================
--- trunk/main/pbx.c (original)
+++ trunk/main/pbx.c Thu Apr 23 15:42:11 2009
@@ -1031,7 +1031,7 @@
 {
 	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_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, ""));
 }
 
 




More information about the asterisk-commits mailing list