Rename ast_channel_emulate_dtmf_digit* funcs
authorTerry Wilson <twilson@digium.com>
Wed, 22 Feb 2012 00:35:54 +0000 (00:35 +0000)
committerTerry Wilson <twilson@digium.com>
Wed, 22 Feb 2012 00:35:54 +0000 (00:35 +0000)
The accessors names for the "emulate_dtmf_digit" field on the ast_channel
are misleading. Change them to ast_channel_dtmf_digit_to_emulate*.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@356183 65c4cc65-6c06-0410-ace0-fbb531ad65f3

include/asterisk/channel.h
main/channel.c
main/channel_internal_api.c

index f80ccfe..165e6e5 100644 (file)
@@ -904,7 +904,7 @@ struct ast_channel {
        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 @@ void ast_channel_macrocontext_set(struct ast_channel *chan, const char *value);
 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);
index a5cb641..3539630 100644 (file)
@@ -3850,7 +3850,7 @@ static struct ast_frame *__ast_read(struct ast_channel *chan, int dropaudio)
                                        /* 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 @@ static struct ast_frame *__ast_read(struct ast_channel *chan, int dropaudio)
                                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 @@ static struct ast_frame *__ast_read(struct ast_channel *chan, int dropaudio)
                                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 @@ static struct ast_frame *__ast_read(struct ast_channel *chan, int dropaudio)
                         * 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 @@ static struct ast_frame *__ast_read(struct ast_channel *chan, int dropaudio)
                                        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)) {
index 5a20619..d0cc10b 100644 (file)
@@ -354,13 +354,13 @@ void ast_channel_macroexten_set(struct ast_channel *chan, const char *value)
 }
 
 
-char ast_channel_emulate_dtmf_digit(const struct ast_channel *chan)
+char ast_channel_dtmf_digit_to_emulate(const struct ast_channel *chan)
 {
-       return chan->__do_not_use_emulate_dtmf_digit;
+       return chan->__do_not_use_dtmf_digit_to_emulate;
 }
-void ast_channel_emulate_dtmf_digit_set(struct ast_channel *chan, char value)
+void ast_channel_dtmf_digit_to_emulate_set(struct ast_channel *chan, char value)
 {
-       chan->__do_not_use_emulate_dtmf_digit = value;
+       chan->__do_not_use_dtmf_digit_to_emulate = value;
 }
 int ast_channel_amaflags(const struct ast_channel *chan)
 {