|
|
@ -412,13 +412,12 @@ struct tone_zone_sound *ast_get_indication_tone(const struct tone_zone *zone, co
|
|
|
|
struct tone_zone_sound *ts;
|
|
|
|
struct tone_zone_sound *ts;
|
|
|
|
|
|
|
|
|
|
|
|
/* we need some tonezone, pick the first */
|
|
|
|
/* we need some tonezone, pick the first */
|
|
|
|
if (!zone) {
|
|
|
|
if (zone == NULL && current_tonezone)
|
|
|
|
if (current_tonezone)
|
|
|
|
zone = current_tonezone; /* default country? */
|
|
|
|
return current_tonezone; /* default country? */
|
|
|
|
if (zone == NULL && tone_zones)
|
|
|
|
if (tone_zones)
|
|
|
|
zone = tone_zones; /* any country? */
|
|
|
|
return tone_zones; /* any country? */
|
|
|
|
if (zone == NULL)
|
|
|
|
return 0; /* not a single country insight */
|
|
|
|
return 0; /* not a single country insight */
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (ast_mutex_lock(&tzlock)) {
|
|
|
|
if (ast_mutex_lock(&tzlock)) {
|
|
|
|
ast_log(LOG_WARNING, "Unable to lock tone_zones list\n");
|
|
|
|
ast_log(LOG_WARNING, "Unable to lock tone_zones list\n");
|
|
|
|