skypopen: interface DOWN during hangup, cosmetics

This commit is contained in:
Giovanni Maruzzelli 2010-10-27 09:12:17 -05:00
parent 99b14db491
commit a5045b1ab0
2 changed files with 8 additions and 8 deletions

View File

@ -592,6 +592,7 @@ static switch_status_t channel_on_hangup(switch_core_session_t *session)
}
}
tech_pvt->interface_state = SKYPOPEN_STATE_HANGUP_REQUESTED;
switch_mutex_lock(tech_pvt->flag_mutex);
#if 1
switch_clear_flag(tech_pvt, TFLAG_IO);
@ -604,7 +605,6 @@ static switch_status_t channel_on_hangup(switch_core_session_t *session)
//DEBUGA_SKYPE("debugging_hangup 2\n", SKYPOPEN_P_LOG);
tech_pvt->interface_state = SKYPOPEN_STATE_HANGUP_REQUESTED;
if (strlen(tech_pvt->skype_call_id)) {
DEBUGA_SKYPE("hanging up skype call: %s\n", SKYPOPEN_P_LOG, tech_pvt->skype_call_id);
@ -648,7 +648,7 @@ static switch_status_t channel_on_hangup(switch_core_session_t *session)
}
//DEBUGA_SKYPE("debugging_hangup 9\n", SKYPOPEN_P_LOG);
tech_pvt->interface_state = SKYPOPEN_STATE_IDLE;
tech_pvt->interface_state = SKYPOPEN_STATE_DOWN;
if (tech_pvt->skype_callflow == CALLFLOW_STATUS_FINISHED) {
tech_pvt->skype_callflow = CALLFLOW_CALL_IDLE;
}

View File

@ -213,11 +213,11 @@ int skypopen_signaling_read(private_t *tech_pvt)
if (!strncasecmp(message, "ERROR", 4)) {
if (!strncasecmp(message, "ERROR 96 CALL", 12)) {
DEBUGA_SKYPE
WARNINGA
("Skype got ERROR: |||%s|||, we are trying to use this interface to make or receive a call, but another call is half-active on this interface. Let's the previous one to continue.\n",
SKYPOPEN_P_LOG, message);
} else if (!strncasecmp(message, "ERROR 99 CALL", 12)) {
ERRORA("Skype got ERROR: |||%s|||, another call is active on this interface\n\n\n", SKYPOPEN_P_LOG, message);
WARNINGA("Skype got ERROR: |||%s|||, another call is active on this interface\n\n\n", SKYPOPEN_P_LOG, message);
tech_pvt->interface_state = SKYPOPEN_STATE_ERROR_DOUBLE_CALL;
} else if (!strncasecmp(message, "ERROR 592 ALTER CALL", 19)) {
NOTICA("Skype got ERROR about TRANSFERRING, no problem: |||%s|||\n", SKYPOPEN_P_LOG, message);
@ -250,7 +250,7 @@ int skypopen_signaling_read(private_t *tech_pvt)
return CALLFLOW_INCOMING_HANGUP;
} else if (!strncasecmp(message, "ERROR 589 ALTER CALL", 19)) {
char msg_to_skype[256];
ERRORA("Skype client was not able to correctly manage tcp audio sockets, probably got a local or remote hangup: |||%s|||\n", SKYPOPEN_P_LOG, message);
WARNINGA("Skype client was not able to correctly manage tcp audio sockets, probably got a local or remote hangup: |||%s|||\n", SKYPOPEN_P_LOG, message);
if(strlen(tech_pvt->skype_call_id)){
sprintf(msg_to_skype, "ALTER CALL %s HANGUP", tech_pvt->skype_call_id);
skypopen_signaling_write(tech_pvt, msg_to_skype);
@ -1979,16 +1979,16 @@ int skypopen_answered(private_t *tech_pvt)
}
} else {
ERRORA("no channel\n", SKYPOPEN_P_LOG);
ERRORA("no channel after INPROGRESS?\n", SKYPOPEN_P_LOG);
return SWITCH_STATUS_FALSE;
}
switch_core_session_rwunlock(session);
} else {
ERRORA("no session after INPROGRESS, let's hangup\n", SKYPOPEN_P_LOG);
WARNINGA("no session after INPROGRESS, let's hangup\n", SKYPOPEN_P_LOG);
return SWITCH_STATUS_FALSE;
}
} else {
ERRORA("no tech_pvt->session_uuid_str after INPROGRESS, let's hangup\n", SKYPOPEN_P_LOG);
WARNINGA("no tech_pvt->session_uuid_str after INPROGRESS, let's hangup\n", SKYPOPEN_P_LOG);
return SWITCH_STATUS_FALSE;
}
return res;