aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2009-01-07 17:42:27 +0000
committerrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2009-01-07 17:42:27 +0000
commit813a4755e932222cac54b41e24f417ba57f3b43d (patch)
tree06d6db657585cc640e1a7f9f2941cc2be6f47e67
parentebec0c1630e3f71b9e5f6ce3c9d64dcf740f2b7e (diff)
Merged revisions 167442 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk ................ r167442 | russell | 2009-01-07 11:35:39 -0600 (Wed, 07 Jan 2009) | 12 lines Merged revisions 167432 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r167432 | russell | 2009-01-07 11:29:53 -0600 (Wed, 07 Jan 2009) | 4 lines Treat an empty string the same way as a NULL country argument. In passing, simplify the handling of returning a default tone zone. ........ ................ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.0@167450 f38db490-d61c-443f-a65b-d21fe96a405b
-rw-r--r--main/indications.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/main/indications.c b/main/indications.c
index 2bb3e440e..e243e6dbe 100644
--- a/main/indications.c
+++ b/main/indications.c
@@ -383,11 +383,8 @@ struct ind_tone_zone *ast_get_indication_zone(const char *country)
AST_RWLIST_RDLOCK(&tone_zones);
- if (!country) {
- if (current_tonezone)
- tz = current_tonezone;
- else
- tz = AST_LIST_FIRST(&tone_zones);
+ if (ast_strlen_zero(country)) {
+ tz = current_tonezone ? current_tonezone : AST_LIST_FIRST(&tone_zones);
} else {
do {
AST_RWLIST_TRAVERSE(&tone_zones, tz, list) {