<h1>Project "FreeSWITCH Source" received a push.</h1>
<h2>branch: master updated</h2>
<pre>
via: 3fd7b8f2675b6198e9edbdf2359794d5dc134b0a (commit)
from: a2c0da53f368f0b11340c3a72814c93b182753b7 (commit)
</pre>= COMMIT LOG ===========================================================
<div class="highlight"><pre>committer: Marc Olivier Chouinard
comments:
switch_channel: Add CS_NONE and correct variable name
<span style="color: #000080; font-weight: bold">diff --git a/src/switch_channel.c b/src/switch_channel.c</span>
<span style="color: #000080; font-weight: bold">index f750496..9e3064b 100644</span>
<span style="color: #A00000">--- a/src/switch_channel.c</span>
<span style="color: #00A000">+++ b/src/switch_channel.c</span>
<span style="color: #800080; font-weight: bold">@@ -184,7 +184,7 @@ struct switch_callstate_table {</span>
        const char *name;
        switch_channel_callstate_t callstate;
};
<span style="color: #A00000">-static struct switch_callstate_table STATE_CHART[] = {</span>
<span style="color: #00A000">+static struct switch_callstate_table CALLSTATE_CHART[] = {</span>
{"DOWN", CCS_DOWN},
{"DIALING", CCS_DIALING},
{"RINGING", CCS_RINGING},
<span style="color: #800080; font-weight: bold">@@ -228,9 +228,9 @@ SWITCH_DECLARE(const char *) switch_channel_callstate2str(switch_channel_callsta</span>
        uint8_t x;
        const char *str = "UNKNOWN";
<span style="color: #A00000">-        for (x = 0; x < (sizeof(STATE_CHART) / sizeof(struct switch_cause_table)) - 1; x++) {</span>
<span style="color: #A00000">-                if (STATE_CHART[x].callstate == callstate) {</span>
<span style="color: #A00000">-                        str = STATE_CHART[x].name;</span>
<span style="color: #00A000">+        for (x = 0; x < (sizeof(CALLSTATE_CHART) / sizeof(struct switch_cause_table)) - 1; x++) {</span>
<span style="color: #00A000">+                if (CALLSTATE_CHART[x].callstate == callstate) {</span>
<span style="color: #00A000">+                        str = CALLSTATE_CHART[x].name;</span>
                        break;
                }
        }
<span style="color: #800080; font-weight: bold">@@ -238,6 +238,7 @@ SWITCH_DECLARE(const char *) switch_channel_callstate2str(switch_channel_callsta</span>
        return str;
}
<span style="color: #00A000">+</span>
SWITCH_DECLARE(switch_call_cause_t) switch_channel_str2callstate(const char *str)
{
        uint8_t x;
<span style="color: #800080; font-weight: bold">@@ -246,9 +247,9 @@ SWITCH_DECLARE(switch_call_cause_t) switch_channel_str2callstate(const char *str</span>
        if (*str > 47 && *str < 58) {
                callstate = atoi(str);
        } else {
<span style="color: #A00000">-                for (x = 0; x < (sizeof(STATE_CHART) / sizeof(struct switch_callstate_table)) - 1 && STATE_CHART[x].name; x++) {</span>
<span style="color: #A00000">-                        if (!strcasecmp(STATE_CHART[x].name, str)) {</span>
<span style="color: #A00000">-                                callstate = STATE_CHART[x].callstate;</span>
<span style="color: #00A000">+                for (x = 0; x < (sizeof(CALLSTATE_CHART) / sizeof(struct switch_callstate_table)) - 1 && CALLSTATE_CHART[x].name; x++) {</span>
<span style="color: #00A000">+                        if (!strcasecmp(CALLSTATE_CHART[x].name, str)) {</span>
<span style="color: #00A000">+                                callstate = CALLSTATE_CHART[x].callstate;</span>
                                break;
                        }
                }
<span style="color: #800080; font-weight: bold">@@ -1606,6 +1607,7 @@ static const char *state_names[] = {</span>
        "CS_HANGUP",
        "CS_REPORTING",
        "CS_DESTROY",
<span style="color: #00A000">+        "CS_NONE",</span>
        NULL
};
</pre></div>
========================================================================<pre>
Summary of changes:
src/switch_channel.c | 16 +++++++++-------
1 files changed, 9 insertions(+), 7 deletions(-)
</pre>
<p>this email was generated because of /git/your-repo.git/hooks/post-receive by the file /git-core/contrib/hooks/post-receive-email<br />
For more info, see <a href="http://blog.chomperstomp.com/?p=630">http://blog.chomperstomp.com/?p=630</a>
-- <br />
FreeSWITCH Source</p>