[asterisk-commits] russell: branch 1.6.1 r168565 - in /branches/1.6.1: ./ apps/ channels/ funcs/...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Jan 13 13:35:59 CST 2009


Author: russell
Date: Tue Jan 13 13:35:59 2009
New Revision: 168565

URL: http://svn.digium.com/svn-view/asterisk?view=rev&rev=168565
Log:
Merged revisions 168562 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/trunk

................
r168562 | russell | 2009-01-13 13:22:13 -0600 (Tue, 13 Jan 2009) | 10 lines

Merged revisions 168561 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r168561 | russell | 2009-01-13 13:13:05 -0600 (Tue, 13 Jan 2009) | 2 lines

Revert unnecessary indications API change from rev 122314

........

................

Modified:
    branches/1.6.1/   (props changed)
    branches/1.6.1/apps/app_disa.c
    branches/1.6.1/apps/app_read.c
    branches/1.6.1/apps/app_readexten.c
    branches/1.6.1/channels/chan_misdn.c
    branches/1.6.1/channels/chan_skinny.c
    branches/1.6.1/channels/chan_unistim.c
    branches/1.6.1/funcs/func_channel.c
    branches/1.6.1/include/asterisk/channel.h
    branches/1.6.1/include/asterisk/indications.h
    branches/1.6.1/main/app.c
    branches/1.6.1/main/channel.c
    branches/1.6.1/main/indications.c
    branches/1.6.1/main/pbx.c
    branches/1.6.1/res/res_indications.c
    branches/1.6.1/res/snmp/agent.c

Propchange: branches/1.6.1/
------------------------------------------------------------------------------
Binary property 'trunk-merged' - no diff available.

Modified: branches/1.6.1/apps/app_disa.c
URL: http://svn.digium.com/svn-view/asterisk/branches/1.6.1/apps/app_disa.c?view=diff&rev=168565&r1=168564&r2=168565
==============================================================================
--- branches/1.6.1/apps/app_disa.c (original)
+++ branches/1.6.1/apps/app_disa.c Tue Jan 13 13:35:59 2009
@@ -102,7 +102,7 @@
 
 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

Modified: branches/1.6.1/apps/app_read.c
URL: http://svn.digium.com/svn-view/asterisk/branches/1.6.1/apps/app_read.c?view=diff&rev=168565&r1=168564&r2=168565
==============================================================================
--- branches/1.6.1/apps/app_read.c (original)
+++ branches/1.6.1/apps/app_read.c Tue Jan 13 13:35:59 2009
@@ -86,7 +86,7 @@
 	int tries = 1, to = 0, x = 0;
 	double tosec;
 	char *argcopy = NULL;
-	struct ind_tone_zone_sound *ts = NULL;
+	struct tone_zone_sound *ts = NULL;
 	struct ast_flags flags = {0};
 	const char *status = "ERROR";
 

Modified: branches/1.6.1/apps/app_readexten.c
URL: http://svn.digium.com/svn-view/asterisk/branches/1.6.1/apps/app_readexten.c?view=diff&rev=168565&r1=168564&r2=168565
==============================================================================
--- branches/1.6.1/apps/app_readexten.c (original)
+++ branches/1.6.1/apps/app_readexten.c Tue Jan 13 13:35:59 2009
@@ -79,7 +79,7 @@
 	int maxdigits = sizeof(exten) - 1;
 	int timeout = 0, digit_timeout = 0, x = 0;
 	char *argcopy = NULL, *status = "";
-	struct ind_tone_zone_sound *ts = NULL;
+	struct tone_zone_sound *ts = NULL;
 	struct ast_flags flags = {0};
 
 	 AST_DECLARE_APP_ARGS(arglist,

Modified: branches/1.6.1/channels/chan_misdn.c
URL: http://svn.digium.com/svn-view/asterisk/branches/1.6.1/channels/chan_misdn.c?view=diff&rev=168565&r1=168564&r2=168565
==============================================================================
--- branches/1.6.1/channels/chan_misdn.c (original)
+++ branches/1.6.1/channels/chan_misdn.c Tue Jan 13 13:35:59 2009
@@ -377,7 +377,7 @@
 	 * \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)
@@ -3289,7 +3289,7 @@
 
 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;
 

Modified: branches/1.6.1/channels/chan_skinny.c
URL: http://svn.digium.com/svn-view/asterisk/branches/1.6.1/channels/chan_skinny.c?view=diff&rev=168565&r1=168564&r2=168565
==============================================================================
--- branches/1.6.1/channels/chan_skinny.c (original)
+++ branches/1.6.1/channels/chan_skinny.c Tue Jan 13 13:35:59 2009
@@ -3768,7 +3768,7 @@
 {
 	struct skinny_subchannel *xferor; /* the sub doing the transferring */
 	struct skinny_subchannel *xferee; /* the sub being transferred */
-	const struct ind_tone_zone_sound *ts = NULL;
+	const struct tone_zone_sound *ts = NULL;
 		
 	if (ast_bridged_channel(sub->owner) || ast_bridged_channel(sub->related->owner)) {
 		if (sub->xferor) {

Modified: branches/1.6.1/channels/chan_unistim.c
URL: http://svn.digium.com/svn-view/asterisk/branches/1.6.1/channels/chan_unistim.c?view=diff&rev=168565&r1=168564&r2=168565
==============================================================================
--- branches/1.6.1/channels/chan_unistim.c (original)
+++ branches/1.6.1/channels/chan_unistim.c Tue Jan 13 13:35:59 2009
@@ -439,7 +439,7 @@
 	char datetimeformat;	    /*!< format used for displaying time/date */
 	char contrast;			  /*!< contrast */
 	char country[3];			/*!< country used for dial tone frequency */
-	struct ind_tone_zone *tz;	       /*!< Tone zone for res_indications (ring, busy, congestion) */
+	struct tone_zone *tz;	       /*!< Tone zone for res_indications (ring, busy, congestion) */
 	char ringvolume;			/*!< Ring volume */
 	char ringstyle;			 /*!< Ring melody */
 	int rtp_port;			   /*!< RTP port used by the phone */
@@ -4057,10 +4057,10 @@
 	return "UNKNOWN";
 }
 
-static void in_band_indication(struct ast_channel *ast, const struct ind_tone_zone *tz,
+static void in_band_indication(struct ast_channel *ast, const struct tone_zone *tz,
 	const char *indication)
 {
-	const struct ind_tone_zone_sound *ts = NULL;
+	const struct tone_zone_sound *ts = NULL;
 
 	ts = ast_get_indication_tone(tz, indication);
 

Modified: branches/1.6.1/funcs/func_channel.c
URL: http://svn.digium.com/svn-view/asterisk/branches/1.6.1/funcs/func_channel.c?view=diff&rev=168565&r1=168564&r2=168565
==============================================================================
--- branches/1.6.1/funcs/func_channel.c (original)
+++ branches/1.6.1/funcs/func_channel.c Tue Jan 13 13:35:59 2009
@@ -134,7 +134,7 @@
 	}
 #endif
 	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;	

Modified: branches/1.6.1/include/asterisk/channel.h
URL: http://svn.digium.com/svn-view/asterisk/branches/1.6.1/include/asterisk/channel.h?view=diff&rev=168565&r1=168564&r2=168565
==============================================================================
--- branches/1.6.1/include/asterisk/channel.h (original)
+++ branches/1.6.1/include/asterisk/channel.h Tue Jan 13 13:35:59 2009
@@ -424,7 +424,7 @@
 	struct ast_trans_pvt *readtrans;		/*!< Read translation path */
 	struct ast_audiohook_list *audiohooks;
 	struct ast_cdr *cdr;				/*!< Call Detail Record */
-	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 */
 #ifdef HAVE_EPOLL

Modified: branches/1.6.1/include/asterisk/indications.h
URL: http://svn.digium.com/svn-view/asterisk/branches/1.6.1/include/asterisk/indications.h?view=diff&rev=168565&r1=168564&r2=168565
==============================================================================
--- branches/1.6.1/include/asterisk/indications.h (original)
+++ branches/1.6.1/include/asterisk/indications.h Tue Jan 13 13:35:59 2009
@@ -39,39 +39,39 @@
 	   are no spaces.  The sequence is repeated back to the 
 	   first tone description not preceeded by !. Duration is
 	   specified in milliseconds */
-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 */
 };
 
-struct ind_tone_zone {
-	AST_RWLIST_ENTRY(ind_tone_zone) list;
+struct tone_zone {
+	AST_RWLIST_ENTRY(tone_zone) 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 */
 };
 
 /*! \brief set the default tone country */
 int ast_set_indication_country(const char *country);
 
 /*! \brief locate tone_zone, given the country. if country == NULL, use the default country */
-struct ind_tone_zone *ast_get_indication_zone(const char *country);
+struct tone_zone *ast_get_indication_zone(const char *country);
 /*! \brief locate a tone_zone_sound, given the tone_zone. if tone_zone == NULL, use the default tone_zone */
-struct ind_tone_zone_sound *ast_get_indication_tone(const struct ind_tone_zone *zone, const char *indication);
+struct tone_zone_sound *ast_get_indication_tone(const struct tone_zone *zone, const char *indication);
 
 /*! \brief 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);
 /*! \brief remove an existing country and all its indications, country must exist */
 int ast_unregister_indication_country(const char *country);
 /*! \brief 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);
 /*! \brief remove an existing tone_zone's indication. tone_zone 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);
 
 /*! \brief Start a tone-list going */
 int ast_playtones_start(struct ast_channel *chan, int vol, const char* tonelist, int interruptible);
@@ -79,10 +79,10 @@
 void ast_playtones_stop(struct ast_channel *chan);
 
 /*! \brief 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 *tone_zones;
+extern struct tone_zone *tone_zones;
 extern ast_mutex_t tzlock;
 #endif
 

Modified: branches/1.6.1/main/app.c
URL: http://svn.digium.com/svn-view/asterisk/branches/1.6.1/main/app.c?view=diff&rev=168565&r1=168564&r2=168565
==============================================================================
--- branches/1.6.1/main/app.c (original)
+++ branches/1.6.1/main/app.c Tue Jan 13 13:35:59 2009
@@ -65,7 +65,7 @@
 */
 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)

Modified: branches/1.6.1/main/channel.c
URL: http://svn.digium.com/svn-view/asterisk/branches/1.6.1/main/channel.c?view=diff&rev=168565&r1=168564&r2=168565
==============================================================================
--- branches/1.6.1/main/channel.c (original)
+++ branches/1.6.1/main/channel.c Tue Jan 13 13:35:59 2009
@@ -2877,7 +2877,7 @@
 	/* 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);

Modified: branches/1.6.1/main/indications.c
URL: http://svn.digium.com/svn-view/asterisk/branches/1.6.1/main/indications.c?view=diff&rev=168565&r1=168564&r2=168565
==============================================================================
--- branches/1.6.1/main/indications.c (original)
+++ branches/1.6.1/main/indications.c Tue Jan 13 13:35:59 2009
@@ -332,12 +332,12 @@
 
 /*--------------------------------------------*/
 
-static AST_RWLIST_HEAD_STATIC(tone_zones, ind_tone_zone);
-static struct ind_tone_zone *current_tonezone;
-
-struct ind_tone_zone *ast_walk_indications(const struct ind_tone_zone *cur)
-{
-	struct ind_tone_zone *tz = NULL;
+static AST_RWLIST_HEAD_STATIC(tone_zones, tone_zone);
+static struct tone_zone *current_tonezone;
+
+struct tone_zone *ast_walk_indications(const struct tone_zone *cur)
+{
+	struct tone_zone *tz = NULL;
 
 	AST_RWLIST_RDLOCK(&tone_zones);
 	/* If cur is not NULL, then we have to iterate through - otherwise just return the first entry */
@@ -358,7 +358,7 @@
 /* Set global indication country */
 int ast_set_indication_country(const char *country)
 {
-	struct ind_tone_zone *zone = NULL;
+	struct tone_zone *zone = NULL;
 
 	/* If no country is specified or we are unable to find the zone, then return not found */
 	if (!country || !(zone = ast_get_indication_zone(country)))
@@ -376,9 +376,9 @@
 }
 
 /* locate tone_zone, given the country. if country == NULL, use the default country */
-struct ind_tone_zone *ast_get_indication_zone(const char *country)
-{
-	struct ind_tone_zone *tz = NULL;
+struct tone_zone *ast_get_indication_zone(const char *country)
+{
+	struct tone_zone *tz = NULL;
 	int alias_loop = 0;
 
 	AST_RWLIST_RDLOCK(&tone_zones);
@@ -411,9 +411,9 @@
 }
 
 /* locate a tone_zone_sound, given the tone_zone. if tone_zone == NULL, use the default tone_zone */
-struct ind_tone_zone_sound *ast_get_indication_tone(const struct ind_tone_zone *zone, const char *indication)
-{
-	struct ind_tone_zone_sound *ts = NULL;
+struct tone_zone_sound *ast_get_indication_tone(const struct tone_zone *zone, const char *indication)
+{
+	struct tone_zone_sound *ts = NULL;
 
 	AST_RWLIST_RDLOCK(&tone_zones);
 
@@ -440,10 +440,10 @@
 }
 
 /* helper function to delete a tone_zone in its entirety */
-static inline void free_zone(struct ind_tone_zone* zone)
+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;
 		ast_free((void *)zone->tones->name);
 		ast_free((void *)zone->tones->data);
 		ast_free(zone->tones);
@@ -459,9 +459,9 @@
 /*--------------------------------------------*/
 
 /* add a new country, if country exists, it will be replaced. */
-int ast_register_indication_country(struct ind_tone_zone *zone)
-{
-	struct ind_tone_zone *tz = NULL;
+int ast_register_indication_country(struct tone_zone *zone)
+{
+	struct tone_zone *tz = NULL;
 
 	AST_RWLIST_WRLOCK(&tone_zones);
 	AST_RWLIST_TRAVERSE_SAFE_BEGIN(&tone_zones, tz, list) {
@@ -494,7 +494,7 @@
  * 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 = NULL;
+	struct tone_zone *tz = NULL;
 	int res = -1;
 
 	AST_RWLIST_WRLOCK(&tone_zones);
@@ -520,9 +520,9 @@
 
 /* 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)
-{
-	struct ind_tone_zone_sound *ts, *ps;
+int ast_register_indication(struct tone_zone *zone, const char *indication, const char *tonelist)
+{
+	struct tone_zone_sound *ts, *ps;
 
 	/* is it an alias? stop */
 	if (zone->alias[0])
@@ -558,9 +558,9 @@
 }
 
 /* remove an existing country's indication. Both country and indication must exist */
-int ast_unregister_indication(struct ind_tone_zone *zone, const char *indication)
-{
-	struct ind_tone_zone_sound *ts,*ps = NULL, *tmp;
+int ast_unregister_indication(struct tone_zone *zone, const char *indication)
+{
+	struct tone_zone_sound *ts,*ps = NULL, *tmp;
 	int res = -1;
 
 	/* is it an alias? stop */

Modified: branches/1.6.1/main/pbx.c
URL: http://svn.digium.com/svn-view/asterisk/branches/1.6.1/main/pbx.c?view=diff&rev=168565&r1=168564&r2=168565
==============================================================================
--- branches/1.6.1/main/pbx.c (original)
+++ branches/1.6.1/main/pbx.c Tue Jan 13 13:35:59 2009
@@ -7996,7 +7996,7 @@
 	} else if (ast_test_flag(&flags, WAITEXTEN_MOH)) {
 		ast_indicate_data(chan, AST_CONTROL_HOLD, opts[0], strlen(opts[0]));
 	} else if (ast_test_flag(&flags, WAITEXTEN_DIALTONE)) {
-		const struct ind_tone_zone_sound *ts = ast_get_indication_tone(chan->zone, "dial");
+		const struct tone_zone_sound *ts = ast_get_indication_tone(chan->zone, "dial");
 		if (ts)
 			ast_playtones_start(chan, 0, ts->data, 0);
 		else

Modified: branches/1.6.1/res/res_indications.c
URL: http://svn.digium.com/svn-view/asterisk/branches/1.6.1/res/res_indications.c?view=diff&rev=168565&r1=168564&r2=168565
==============================================================================
--- branches/1.6.1/res/res_indications.c (original)
+++ branches/1.6.1/res/res_indications.c Tue Jan 13 13:35:59 2009
@@ -65,7 +65,7 @@
  */
 static char *handle_cli_indication_add(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a)
 {
-	struct ind_tone_zone *tz;
+	struct tone_zone *tz;
 	int created_country = 0;
 
 	switch (cmd) {
@@ -115,7 +115,7 @@
  */
 static char *handle_cli_indication_remove(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a)
 {
-	struct ind_tone_zone *tz;
+	struct tone_zone *tz;
 
 	switch (cmd) {
 	case CLI_INIT:
@@ -160,7 +160,7 @@
  */
 static char *handle_cli_indication_show(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a)
 {
-	struct ind_tone_zone *tz = NULL;
+	struct tone_zone *tz = NULL;
 	char buf[256];
 	int found_country = 0;
 
@@ -189,7 +189,7 @@
 		int i, j;
 		for (i = 2; i < a->argc; i++) {
 			if (strcasecmp(tz->country, a->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(a->fd, "Country Indication      PlayList\n");
@@ -221,7 +221,7 @@
  */
 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]) {
@@ -250,10 +250,10 @@
 }
 
 /* helper function to delete a tone_zone in its entirety */
-static inline void free_zone(struct ind_tone_zone* zone)
+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;
 		ast_free((void *)zone->tones->name);
 		ast_free((void *)zone->tones->data);
 		ast_free(zone->tones);
@@ -273,7 +273,7 @@
 	struct ast_variable *v;
 	char *cxt;
 	char *c;
-	struct ind_tone_zone *tones;
+	struct tone_zone *tones;
 	const char *country = NULL;
 	struct ast_flags config_flags = { reload ? CONFIG_FLAG_FILEUNCHANGED : 0 };
 
@@ -333,7 +333,7 @@
 				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);
 						free_zone(tones);
@@ -350,7 +350,7 @@
 				}
 			} 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 */

Modified: branches/1.6.1/res/snmp/agent.c
URL: http://svn.digium.com/svn-view/asterisk/branches/1.6.1/res/snmp/agent.c?view=diff&rev=168565&r1=168564&r2=168565
==============================================================================
--- branches/1.6.1/res/snmp/agent.c (original)
+++ branches/1.6.1/res/snmp/agent.c Tue Jan 13 13:35:59 2009
@@ -644,7 +644,7 @@
 								  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;
@@ -674,7 +674,7 @@
 									   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))




More information about the asterisk-commits mailing list