]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Revert unnecessary indications API change from rev 122314
authorRussell Bryant <russell@russellbryant.com>
Tue, 13 Jan 2009 19:13:05 +0000 (19:13 +0000)
committerRussell Bryant <russell@russellbryant.com>
Tue, 13 Jan 2009 19:13:05 +0000 (19:13 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@168561 65c4cc65-6c06-0410-ace0-fbb531ad65f3

apps/app_disa.c
apps/app_read.c
channels/chan_misdn.c
funcs/func_channel.c
include/asterisk/channel.h
include/asterisk/indications.h
main/app.c
main/channel.c
main/indications.c
res/res_indications.c
res/snmp/agent.c

index c3fe1a90a5c8df996ab7ef3759ec6305392e7839..f49d19704c119f60ea19513fada209c8aa9f050e 100644 (file)
@@ -98,7 +98,7 @@ static char *descrip =
 
 static void play_dialtone(struct ast_channel *chan, char *mailbox)
 {
-       const struct ind_tone_zone_sound *ts = NULL;
+       const struct tone_zone_sound *ts = NULL;
        if(ast_app_has_voicemail(mailbox, NULL))
                ts = ast_get_indication_tone(chan->zone, "dialrecall");
        else
index 897ddd2fe3d5abe8dc2a7c8625273d17efb792cd..bb3dd669bf79572fff2f06e568c4b320c6ce64f6 100644 (file)
@@ -92,7 +92,7 @@ static int read_exec(struct ast_channel *chan, void *data)
        int maxdigits = 255;
        int tries = 1, to = 0, x = 0;
        char *argcopy = NULL;
-       struct ind_tone_zone_sound *ts;
+       struct tone_zone_sound *ts;
        struct ast_flags flags = {0};
 
         AST_DECLARE_APP_ARGS(arglist,
index 124d6e9be7f7da2ae6d61057e3620de902202b66..c5965a1c13a1c4262393dda41e8a9476d0c44798 100644 (file)
@@ -382,7 +382,7 @@ struct chan_list {
         * \brief Tone zone sound used for dialtone generation.
         * \note Used as a boolean.  Non-NULL to prod generation if enabled. 
         */
-       const struct ind_tone_zone_sound *ts;
+       const struct tone_zone_sound *ts;
        
        /*!
         * \brief Enables overlap dialing for the set amount of seconds.  (0 = Disabled)
@@ -3079,7 +3079,7 @@ static enum ast_bridge_result  misdn_bridge (struct ast_channel *c0,
 
 static int dialtone_indicate(struct chan_list *cl)
 {
-       const struct ind_tone_zone_sound *ts = NULL;
+       const struct tone_zone_sound *ts = NULL;
        struct ast_channel *ast = cl->ast;
        int nd = 0;
 
index a37ebc9728a5a184247c0cec487afa0094233149..302272e0b7161802dee61ecd4b564066038a1d8a 100644 (file)
@@ -107,7 +107,7 @@ static int func_channel_write(struct ast_channel *chan, char *function,
        else if (!strcasecmp(data, "musicclass"))
                locked_string_field_set(chan, musicclass, value);
        else if (!strcasecmp(data, "tonezone")) {
-               struct ind_tone_zone *new_zone;
+               struct tone_zone *new_zone;
                if (!(new_zone = ast_get_indication_zone(value))) {
                        ast_log(LOG_ERROR, "Unknown country code '%s' for tonezone. Check indications.conf for available country codes.\n", value);
                        ret = -1;       
index 29b31b88435a33be537248064ce954cc125f6b09..7ae0dbeb598cd6628ba43a2e8680aabd3dc95145 100644 (file)
@@ -414,7 +414,7 @@ struct ast_channel {
        struct ast_cdr *cdr;                            /*!< Call Detail Record */
        enum ast_channel_adsicpe adsicpe;               /*!< Whether or not ADSI is detected on CPE */
 
-       struct ind_tone_zone *zone;                             /*!< Tone zone as set in indications.conf or
+       struct tone_zone *zone;                         /*!< Tone zone as set in indications.conf or
                                                                in the CHANNEL dialplan function */
 
        struct ast_channel_monitor *monitor;            /*!< Channel monitoring */
index ba342675e7f9dea6f2065f5669920caa73d37147..be0635c9057d5069028f05c3d971327f539df849 100644 (file)
@@ -34,8 +34,8 @@
 
 #include "asterisk/lock.h"
 
-struct ind_tone_zone_sound {
-       struct ind_tone_zone_sound *next;               /* next element */
+struct tone_zone_sound {
+       struct tone_zone_sound *next;           /* next element */
        const char *name;                       /* Identifing name */
        const char *data;                       /* Actual zone description */
        /* Description is a series of tones of the format:
@@ -45,33 +45,33 @@ struct ind_tone_zone_sound {
           specified in milliseconds */
 };
 
-struct ind_tone_zone {
-       struct ind_tone_zone* next;                             /* next in list */
+struct tone_zone {
+       struct tone_zone* next;                         /* next in list */
        char country[5];                                /* Country code */
        char alias[5];                                  /* is this an alias? */
        char description[40];                           /* Description */
        int  nrringcadence;                             /* # registered ringcadence elements */
        int *ringcadence;                               /* Ring cadence */
-       struct ind_tone_zone_sound *tones;                      /* The known tones for this zone */
+       struct tone_zone_sound *tones;                  /* The known tones for this zone */
 };
 
 /* set the default tone country */
 int ast_set_indication_country(const char *country);
 
 /* 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 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);
+struct tone_zone *ast_get_indication_zone(const char *country);
+/* 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);
 
 /* add a new country, if country exists, it will be replaced. */
-int ast_register_indication_country(struct ind_tone_zone *country);
+int ast_register_indication_country(struct tone_zone *country);
 /* remove an existing country and all its indications, country must exist */
 int ast_unregister_indication_country(const char *country);
-/* 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);
-/* remove an existing ind_tone_zone's indication. ind_tone_zone must exist */
-int ast_unregister_indication(struct ind_tone_zone *zone, const char *indication);
+int ast_register_indication(struct tone_zone *zone, const char *indication, const char *tonelist);
+/* remove an existing tone_zone's indication. tone_zone must exist */
+int ast_unregister_indication(struct tone_zone *zone, const char *indication);
 
 /* Start a tone-list going */
 int ast_playtones_start(struct ast_channel *chan, int vol, const char* tonelist, int interruptible);
@@ -79,10 +79,10 @@ int ast_playtones_start(struct ast_channel *chan, int vol, const char* tonelist,
 void ast_playtones_stop(struct ast_channel *chan);
 
 /* support for walking through a list of indications */
-struct ind_tone_zone *ast_walk_indications(const struct ind_tone_zone *cur);
+struct tone_zone *ast_walk_indications(const struct tone_zone *cur);
 
 #if 0
-extern struct ind_tone_zone *ind_tone_zones;
+extern struct tone_zone *tone_zones;
 extern ast_mutex_t tzlock;
 #endif
 
index 88346f42470c2eea07db09e81b35e00e2208d2bf..bcecff56877b363bdb5596219945ab1c0ede8216 100644 (file)
@@ -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)
index 6d6e5157e58a40c0261f43ce40ba444a5901492a..88ede049ea50cef0a4e2979dadbc456f78be1796 100644 (file)
@@ -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);
index f9d9a85fab57ffa38b1c3d70e686b058f01e6dd3..64f96b5d57b87832f37aa2621ebff26b4a62d63d 100644 (file)
@@ -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 */
index 05382a0cbd8149e6384dd322943b6af664064ec5..9bff10b76e8fca6aa4831f6b0110f5fa779d7a78 100644 (file)
@@ -85,7 +85,7 @@ char *playtones_desc=
  */
 static int handle_add_indication(int fd, int argc, char *argv[])
 {
-       struct ind_tone_zone *tz;
+       struct tone_zone *tz;
        int created_country = 0;
        if (argc != 5) return RESULT_SHOWUSAGE;
 
@@ -119,7 +119,7 @@ static int handle_add_indication(int fd, int argc, char *argv[])
  */
 static int handle_remove_indication(int fd, int argc, char *argv[])
 {
-       struct ind_tone_zone *tz;
+       struct tone_zone *tz;
        if (argc != 3 && argc != 4) return RESULT_SHOWUSAGE;
 
        if (argc == 3) {
@@ -148,7 +148,7 @@ static int handle_remove_indication(int fd, int argc, char *argv[])
  */
 static int handle_show_indications(int fd, int argc, char *argv[])
 {
-       struct ind_tone_zone *tz = NULL;
+       struct tone_zone *tz = NULL;
        char buf[256];
        int found_country = 0;
 
@@ -166,7 +166,7 @@ static int handle_show_indications(int fd, int argc, char *argv[])
                for (i=2; i<argc; i++) {
                        if (strcasecmp(tz->country,argv[i])==0 &&
                            !tz->alias[0]) {
-                               struct ind_tone_zone_sound* ts;
+                               struct tone_zone_sound* ts;
                                if (!found_country) {
                                        found_country = 1;
                                        ast_cli(fd,"Country Indication      PlayList\n"
@@ -196,7 +196,7 @@ static int handle_show_indications(int fd, int argc, char *argv[])
  */
 static int handle_playtones(struct ast_channel *chan, void *data)
 {
-       struct ind_tone_zone_sound *ts;
+       struct tone_zone_sound *ts;
        int res;
 
        if (!data || !((char*)data)[0]) {
@@ -231,7 +231,7 @@ static int ind_load_module(void)
        struct ast_variable *v;
        char *cxt;
        char *c;
-       struct ind_tone_zone *tones;
+       struct tone_zone *tones;
        const char *country = NULL;
 
        /* that the following cast is needed, is yuk! */
@@ -284,7 +284,7 @@ static int ind_load_module(void)
                                c = countries;
                                country = strsep(&c,",");
                                while (country) {
-                                       struct ind_tone_zone* azone;
+                                       struct tone_zone* azone;
                                        if (!(azone = ast_calloc(1, sizeof(*azone)))) {
                                                ast_config_destroy(cfg);
                                                return -1;
@@ -300,7 +300,7 @@ static int ind_load_module(void)
                                }
                        } else {
                                /* add tone to country */
-                               struct ind_tone_zone_sound *ps,*ts;
+                               struct tone_zone_sound *ps,*ts;
                                for (ps=NULL,ts=tones->tones; ts; ps=ts, ts=ts->next) {
                                        if (strcasecmp(v->name,ts->name)==0) {
                                                /* already there */
index 7ab0d68f91e17b48cc50c25ea244420eef638af8..96398e8a8978b36569beb21e9ae17c3d6d73abd6 100644 (file)
@@ -621,7 +621,7 @@ static u_char *ast_var_indications(struct variable *vp, oid *name, size_t *lengt
                                                                  int exact, size_t *var_len, WriteMethod **write_method)
 {
     static unsigned long long_ret;
-    struct ind_tone_zone *tz = NULL;
+    struct tone_zone *tz = NULL;
 
     if (header_generic(vp, name, length, exact, var_len, write_method))
                return NULL;
@@ -651,7 +651,7 @@ static u_char *ast_var_indications_table(struct variable *vp, oid *name, size_t
                                                                           int exact, size_t *var_len, WriteMethod **write_method)
 {
     static unsigned long long_ret;
-    struct ind_tone_zone *tz = NULL;
+    struct tone_zone *tz = NULL;
     int i;
 
     if (header_simple_table(vp, name, length, exact, var_len, write_method, -1))