aboutsummaryrefslogtreecommitdiffstats
path: root/main
diff options
context:
space:
mode:
authorrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2009-01-13 19:13:05 +0000
committerrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2009-01-13 19:13:05 +0000
commitd5a841f5ab5789d4a6f75e81966e085b5cf5b543 (patch)
tree329f543e4a5ff1d77b0f7d0d9297315df608314b /main
parent3e8748117aa0389222d223b386e30ef894614281 (diff)
Revert unnecessary indications API change from rev 122314
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@168561 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main')
-rw-r--r--main/app.c2
-rw-r--r--main/channel.c2
-rw-r--r--main/indications.c78
3 files changed, 41 insertions, 41 deletions
diff --git a/main/app.c b/main/app.c
index 88346f424..bcecff568 100644
--- a/main/app.c
+++ b/main/app.c
@@ -64,7 +64,7 @@ of 'maxlen' or 'size' minus the original strlen() of collect digits.
*/
int ast_app_dtget(struct ast_channel *chan, const char *context, char *collect, size_t size, int maxlen, int timeout)
{
- struct ind_tone_zone_sound *ts;
+ struct tone_zone_sound *ts;
int res=0, x=0;
if (maxlen > size)
diff --git a/main/channel.c b/main/channel.c
index 6d6e5157e..88ede049e 100644
--- a/main/channel.c
+++ b/main/channel.c
@@ -2483,7 +2483,7 @@ int ast_indicate_data(struct ast_channel *chan, int _condition,
/* By using an enum, we'll get compiler warnings for values not handled
* in switch statements. */
enum ast_control_frame_type condition = _condition;
- const struct ind_tone_zone_sound *ts = NULL;
+ const struct tone_zone_sound *ts = NULL;
int res = -1;
ast_channel_lock(chan);
diff --git a/main/indications.c b/main/indications.c
index f9d9a85fa..64f96b5d5 100644
--- a/main/indications.c
+++ b/main/indications.c
@@ -329,21 +329,21 @@ void ast_playtones_stop(struct ast_channel *chan)
/*--------------------------------------------*/
-static struct ind_tone_zone *ind_tone_zones;
-static struct ind_tone_zone *current_tonezone;
+static struct tone_zone *tone_zones;
+static struct tone_zone *current_tonezone;
-/* Protect the ind_tone_zones list (highly unlikely that two things would change
+/* Protect the tone_zones list (highly unlikely that two things would change
* it at the same time, but still! */
AST_MUTEX_DEFINE_STATIC(tzlock);
-struct ind_tone_zone *ast_walk_indications(const struct ind_tone_zone *cur)
+struct tone_zone *ast_walk_indications(const struct tone_zone *cur)
{
- struct ind_tone_zone *tz;
+ struct tone_zone *tz;
if (cur == NULL)
- return ind_tone_zones;
+ return tone_zones;
ast_mutex_lock(&tzlock);
- for (tz = ind_tone_zones; tz; tz = tz->next)
+ for (tz = tone_zones; tz; tz = tz->next)
if (tz == cur)
break;
if (tz)
@@ -356,7 +356,7 @@ struct ind_tone_zone *ast_walk_indications(const struct ind_tone_zone *cur)
int ast_set_indication_country(const char *country)
{
if (country) {
- struct ind_tone_zone *z = ast_get_indication_zone(country);
+ struct tone_zone *z = ast_get_indication_zone(country);
if (z) {
if (option_verbose > 2)
ast_verbose(VERBOSE_PREFIX_3 "Setting default indication country to '%s'\n",country);
@@ -367,22 +367,22 @@ int ast_set_indication_country(const char *country)
return 1; /* not found */
}
-/* locate ind_tone_zone, given the country. if country == NULL, use the default country */
-struct ind_tone_zone *ast_get_indication_zone(const char *country)
+/* locate tone_zone, given the country. if country == NULL, use the default country */
+struct tone_zone *ast_get_indication_zone(const char *country)
{
- struct ind_tone_zone *tz;
+ struct tone_zone *tz;
int alias_loop = 0;
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;
+ return current_tonezone ? current_tonezone : tone_zones;
}
ast_mutex_lock(&tzlock);
do {
- for (tz=ind_tone_zones; tz; tz=tz->next) {
+ for (tz=tone_zones; tz; tz=tz->next) {
if (strcasecmp(country,tz->country)==0) {
- /* ind_tone_zone found */
+ /* tone_zone found */
if (tz->alias && tz->alias[0]) {
country = tz->alias;
break;
@@ -399,16 +399,16 @@ struct ind_tone_zone *ast_get_indication_zone(const char *country)
return 0;
}
-/* locate a ind_tone_zone_sound, given the ind_tone_zone. if ind_tone_zone == NULL, use the default ind_tone_zone */
-struct ind_tone_zone_sound *ast_get_indication_tone(const struct ind_tone_zone *zone, const char *indication)
+/* locate a tone_zone_sound, given the tone_zone. if tone_zone == NULL, use the default tone_zone */
+struct tone_zone_sound *ast_get_indication_tone(const struct tone_zone *zone, const char *indication)
{
- struct ind_tone_zone_sound *ts;
+ struct tone_zone_sound *ts;
/* we need some tonezone, pick the first */
if (zone == NULL && current_tonezone)
zone = current_tonezone; /* default country? */
- if (zone == NULL && ind_tone_zones)
- zone = ind_tone_zones; /* any country? */
+ if (zone == NULL && tone_zones)
+ zone = tone_zones; /* any country? */
if (zone == NULL)
return 0; /* not a single country insight */
@@ -425,11 +425,11 @@ struct ind_tone_zone_sound *ast_get_indication_tone(const struct ind_tone_zone *
return 0;
}
-/* helper function to delete a ind_tone_zone in its entirety */
-static inline void free_zone(struct ind_tone_zone* zone)
+/* helper function to delete a tone_zone in its entirety */
+static inline void free_zone(struct tone_zone* zone)
{
while (zone->tones) {
- struct ind_tone_zone_sound *tmp = zone->tones->next;
+ struct tone_zone_sound *tmp = zone->tones->next;
free((void*)zone->tones->name);
free((void*)zone->tones->data);
free(zone->tones);
@@ -443,19 +443,19 @@ static inline void free_zone(struct ind_tone_zone* zone)
/*--------------------------------------------*/
/* add a new country, if country exists, it will be replaced. */
-int ast_register_indication_country(struct ind_tone_zone *zone)
+int ast_register_indication_country(struct tone_zone *zone)
{
- struct ind_tone_zone *tz,*pz;
+ struct tone_zone *tz,*pz;
ast_mutex_lock(&tzlock);
- for (pz=NULL,tz=ind_tone_zones; tz; pz=tz,tz=tz->next) {
+ for (pz=NULL,tz=tone_zones; tz; pz=tz,tz=tz->next) {
if (strcasecmp(zone->country,tz->country)==0) {
- /* ind_tone_zone already there, replace */
+ /* tone_zone already there, replace */
zone->next = tz->next;
if (pz)
pz->next = zone;
else
- ind_tone_zones = zone;
+ tone_zones = zone;
/* if we are replacing the default zone, re-point it */
if (tz == current_tonezone)
current_tonezone = zone;
@@ -470,7 +470,7 @@ int ast_register_indication_country(struct ind_tone_zone *zone)
if (pz)
pz->next = zone;
else
- ind_tone_zones = zone;
+ tone_zones = zone;
ast_mutex_unlock(&tzlock);
if (option_verbose > 2)
@@ -482,21 +482,21 @@ int ast_register_indication_country(struct ind_tone_zone *zone)
* Also, all countries which are an alias for the specified country are removed. */
int ast_unregister_indication_country(const char *country)
{
- struct ind_tone_zone *tz, *pz = NULL, *tmp;
+ struct tone_zone *tz, *pz = NULL, *tmp;
int res = -1;
ast_mutex_lock(&tzlock);
- tz = ind_tone_zones;
+ tz = tone_zones;
while (tz) {
if (country==NULL ||
(strcasecmp(country, tz->country)==0 ||
strcasecmp(country, tz->alias)==0)) {
- /* ind_tone_zone found, remove */
+ /* tone_zone found, remove */
tmp = tz->next;
if (pz)
pz->next = tmp;
else
- ind_tone_zones = tmp;
+ tone_zones = tmp;
/* if we are unregistering the default country, w'll notice */
if (tz == current_tonezone) {
ast_log(LOG_NOTICE,"Removed default indication country '%s'\n",tz->country);
@@ -505,8 +505,8 @@ int ast_unregister_indication_country(const char *country)
if (option_verbose > 2)
ast_verbose(VERBOSE_PREFIX_3 "Unregistered indication country '%s'\n",tz->country);
free_zone(tz);
- if (ind_tone_zones == tz)
- ind_tone_zones = tmp;
+ if (tone_zones == tz)
+ tone_zones = tmp;
tz = tmp;
res = 0;
}
@@ -520,11 +520,11 @@ int ast_unregister_indication_country(const char *country)
return res;
}
-/* add a new indication to a ind_tone_zone. ind_tone_zone must exist. if the indication already
+/* add a new indication to a tone_zone. tone_zone must exist. if the indication already
* exists, it will be replaced. */
-int ast_register_indication(struct ind_tone_zone *zone, const char *indication, const char *tonelist)
+int ast_register_indication(struct tone_zone *zone, const char *indication, const char *tonelist)
{
- struct ind_tone_zone_sound *ts,*ps;
+ struct tone_zone_sound *ts,*ps;
/* is it an alias? stop */
if (zone->alias[0])
@@ -560,9 +560,9 @@ int ast_register_indication(struct ind_tone_zone *zone, const char *indication,
}
/* remove an existing country's indication. Both country and indication must exist */
-int ast_unregister_indication(struct ind_tone_zone *zone, const char *indication)
+int ast_unregister_indication(struct tone_zone *zone, const char *indication)
{
- struct ind_tone_zone_sound *ts,*ps = NULL, *tmp;
+ struct tone_zone_sound *ts,*ps = NULL, *tmp;
int res = -1;
/* is it an alias? stop */