[svn-commits] twilson: trunk r356183 - in /trunk: include/asterisk/ main/

SVN commits to the Digium repositories svn-commits at lists.digium.com
Tue Feb 21 18:35:58 CST 2012


Author: twilson
Date: Tue Feb 21 18:35:54 2012
New Revision: 356183

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=356183
Log:
Rename ast_channel_emulate_dtmf_digit* funcs

The accessors names for the "emulate_dtmf_digit" field on the ast_channel
are misleading. Change them to ast_channel_dtmf_digit_to_emulate*.

Modified:
    trunk/include/asterisk/channel.h
    trunk/main/channel.c
    trunk/main/channel_internal_api.c

Modified: trunk/include/asterisk/channel.h
URL: http://svnview.digium.com/svn/asterisk/trunk/include/asterisk/channel.h?view=diff&rev=356183&r1=356182&r2=356183
==============================================================================
--- trunk/include/asterisk/channel.h (original)
+++ trunk/include/asterisk/channel.h Tue Feb 21 18:35:54 2012
@@ -904,7 +904,7 @@
 	char __do_not_use_exten[AST_MAX_EXTENSION];			/*!< Dialplan: Current extension number */
 	char __do_not_use_macrocontext[AST_MAX_CONTEXT];		/*!< Macro: Current non-macro context. See app_macro.c */
 	char __do_not_use_macroexten[AST_MAX_EXTENSION];		/*!< Macro: Current non-macro extension. See app_macro.c */
-	char __do_not_use_emulate_dtmf_digit;			/*!< Digit being emulated */
+	char __do_not_use_dtmf_digit_to_emulate;			/*!< Digit being emulated */
 };
 
 /*! \brief ast_channel_tech Properties */
@@ -3646,8 +3646,8 @@
 const char *ast_channel_macroexten(const struct ast_channel *chan);
 void ast_channel_macroexten_set(struct ast_channel *chan, const char *value);
 
-char ast_channel_emulate_dtmf_digit(const struct ast_channel *chan);
-void ast_channel_emulate_dtmf_digit_set(struct ast_channel *chan, char value);
+char ast_channel_dtmf_digit_to_emulate(const struct ast_channel *chan);
+void ast_channel_dtmf_digit_to_emulate_set(struct ast_channel *chan, char value);
 int ast_channel_amaflags(const struct ast_channel *chan);
 void ast_channel_amaflags_set(struct ast_channel *chan, int value);
 int ast_channel_epfd(const struct ast_channel *chan);

Modified: trunk/main/channel.c
URL: http://svnview.digium.com/svn/asterisk/trunk/main/channel.c?view=diff&rev=356183&r1=356182&r2=356183
==============================================================================
--- trunk/main/channel.c (original)
+++ trunk/main/channel.c Tue Feb 21 18:35:54 2012
@@ -3850,7 +3850,7 @@
 					/* There was no begin, turn this into a begin and send the end later */
 					f->frametype = AST_FRAME_DTMF_BEGIN;
 					ast_set_flag(chan, AST_FLAG_EMULATE_DTMF);
-					ast_channel_emulate_dtmf_digit_set(chan, f->subclass.integer);
+					ast_channel_dtmf_digit_to_emulate_set(chan, f->subclass.integer);
 					chan->dtmf_tv = ast_tvnow();
 					if (f->len) {
 						if (f->len > AST_MIN_DTMF_DURATION)
@@ -3897,7 +3897,7 @@
 				if (f->len < AST_MIN_DTMF_DURATION && !ast_test_flag(chan, AST_FLAG_END_DTMF_ONLY)) {
 					ast_log(LOG_DTMF, "DTMF end '%c' has duration %ld but want minimum %d, emulating on %s\n", f->subclass.integer, f->len, AST_MIN_DTMF_DURATION, ast_channel_name(chan));
 					ast_set_flag(chan, AST_FLAG_EMULATE_DTMF);
-					ast_channel_emulate_dtmf_digit_set(chan, f->subclass.integer);
+					ast_channel_dtmf_digit_to_emulate_set(chan, f->subclass.integer);
 					ast_channel_emulate_dtmf_duration_set(chan, AST_MIN_DTMF_DURATION - f->len);
 					ast_frfree(f);
 					f = &ast_null_frame;
@@ -3940,17 +3940,17 @@
 				struct timeval now = ast_tvnow();
 				if (!ast_channel_emulate_dtmf_duration(chan)) {
 					ast_clear_flag(chan, AST_FLAG_EMULATE_DTMF);
-					ast_channel_emulate_dtmf_digit_set(chan, 0);
+					ast_channel_dtmf_digit_to_emulate_set(chan, 0);
 				} else if (ast_tvdiff_ms(now, chan->dtmf_tv) >= ast_channel_emulate_dtmf_duration(chan)) {
 					ast_channel_emulate_dtmf_duration_set(chan, 0);
 					ast_frfree(f);
 					f = &chan->dtmff;
 					f->frametype = AST_FRAME_DTMF_END;
-					f->subclass.integer = ast_channel_emulate_dtmf_digit(chan);
+					f->subclass.integer = ast_channel_dtmf_digit_to_emulate(chan);
 					f->len = ast_tvdiff_ms(now, chan->dtmf_tv);
 					chan->dtmf_tv = now;
 					ast_clear_flag(chan, AST_FLAG_EMULATE_DTMF);
-					ast_channel_emulate_dtmf_digit_set(chan, 0);
+					ast_channel_dtmf_digit_to_emulate_set(chan, 0);
 					ast_log(LOG_DTMF, "DTMF end emulation of '%c' queued on %s\n", f->subclass.integer, ast_channel_name(chan));
 					if (ast_channel_audiohooks(chan)) {
 						struct ast_frame *old_frame = f;
@@ -3969,7 +3969,7 @@
 			 * between DTMF digits. */
 			if (ast_test_flag(chan, AST_FLAG_EMULATE_DTMF) && !ast_channel_emulate_dtmf_duration(chan)) {
 				ast_clear_flag(chan, AST_FLAG_EMULATE_DTMF);
-				ast_channel_emulate_dtmf_digit_set(chan, 0);
+				ast_channel_dtmf_digit_to_emulate_set(chan, 0);
 			}
 
 			if (dropaudio || ast_test_flag(chan, AST_FLAG_IN_DTMF)) {
@@ -3986,7 +3986,7 @@
 					ast_frfree(f);
 					f = &chan->dtmff;
 					f->frametype = AST_FRAME_DTMF_END;
-					f->subclass.integer = ast_channel_emulate_dtmf_digit(chan);
+					f->subclass.integer = ast_channel_dtmf_digit_to_emulate(chan);
 					f->len = ast_tvdiff_ms(now, chan->dtmf_tv);
 					chan->dtmf_tv = now;
 					if (ast_channel_audiohooks(chan)) {

Modified: trunk/main/channel_internal_api.c
URL: http://svnview.digium.com/svn/asterisk/trunk/main/channel_internal_api.c?view=diff&rev=356183&r1=356182&r2=356183
==============================================================================
--- trunk/main/channel_internal_api.c (original)
+++ trunk/main/channel_internal_api.c Tue Feb 21 18:35:54 2012
@@ -354,13 +354,13 @@
 }
 
 
-char ast_channel_emulate_dtmf_digit(const struct ast_channel *chan)
-{
-	return chan->__do_not_use_emulate_dtmf_digit;
-}
-void ast_channel_emulate_dtmf_digit_set(struct ast_channel *chan, char value)
-{
-	chan->__do_not_use_emulate_dtmf_digit = value;
+char ast_channel_dtmf_digit_to_emulate(const struct ast_channel *chan)
+{
+	return chan->__do_not_use_dtmf_digit_to_emulate;
+}
+void ast_channel_dtmf_digit_to_emulate_set(struct ast_channel *chan, char value)
+{
+	chan->__do_not_use_dtmf_digit_to_emulate = value;
 }
 int ast_channel_amaflags(const struct ast_channel *chan)
 {




More information about the svn-commits mailing list