fix cause code passthrough

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@4061 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Anthony Minessale
2007-01-26 20:39:45 +00:00
parent 28807552d0
commit 00d7e70e2d
4 changed files with 15 additions and 15 deletions

View File

@@ -120,7 +120,7 @@ struct switch_channel {
SWITCH_DECLARE(char *) switch_channel_cause2str(switch_call_cause_t cause)
{
uint8_t x;
char *str = "UNALLOCATED";
char *str = "UNKNOWN";
for(x = 0; CAUSE_CHART[x].name; x++) {
if (CAUSE_CHART[x].cause == cause) {
@@ -620,7 +620,7 @@ SWITCH_DECLARE(switch_channel_state_t) switch_channel_perform_set_state(switch_c
channel->state = state;
switch_mutex_unlock(channel->flag_mutex);
if (state == CS_HANGUP && channel->hangup_cause == SWITCH_CAUSE_UNALLOCATED) {
if (state == CS_HANGUP && !channel->hangup_cause) {
channel->hangup_cause = SWITCH_CAUSE_NORMAL_CLEARING;
}
if (state < CS_HANGUP) {