diff options
author | Russell Bryant <russell@russellbryant.com> | 2009-01-07 17:35:39 +0000 |
---|---|---|
committer | Russell Bryant <russell@russellbryant.com> | 2009-01-07 17:35:39 +0000 |
commit | 8ccb6795e9974b4fd018f1fbdad9e9cc4a1cb88d (patch) | |
tree | a0f383e24ba88da99ceeadeaedd61f4808f17c8f /main/indications.c | |
parent | 08e142b1e7a239b8f0a19f062803e746a6023388 (diff) |
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: https://origsvn.digium.com/svn/asterisk/trunk@167442 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'main/indications.c')
-rw-r--r-- | main/indications.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/main/indications.c b/main/indications.c index e1ec4e293..2057fd321 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) { |