[asterisk-commits] russell: branch 1.4 r167432 - /branches/1.4/main/indications.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Wed Jan 7 11:29:55 CST 2009
Author: russell
Date: Wed Jan 7 11:29:53 2009
New Revision: 167432
URL: http://svn.digium.com/view/asterisk?view=rev&rev=167432
Log:
Treat an empty string the same way as a NULL country argument.
In passing, simplify the handling of returning a default tone zone.
Modified:
branches/1.4/main/indications.c
Modified: branches/1.4/main/indications.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/main/indications.c?view=diff&rev=167432&r1=167431&r2=167432
==============================================================================
--- branches/1.4/main/indications.c (original)
+++ branches/1.4/main/indications.c Wed Jan 7 11:29:53 2009
@@ -373,13 +373,10 @@
struct ind_tone_zone *tz;
int alias_loop = 0;
- /* we need some tonezone, pick the first */
- if (country == NULL && current_tonezone)
- return current_tonezone; /* default country? */
- if (country == NULL && ind_tone_zones)
- return ind_tone_zones; /* any country? */
- if (country == NULL)
- return 0; /* not a single country insight */
+ if (ast_strlen_zero(country)) {
+ /* No country specified? Return the default or the first in the list */
+ return current_tonezone ? current_tonezone : ind_tone_zones;
+ }
ast_mutex_lock(&tzlock);
do {
More information about the asterisk-commits
mailing list