From a5045b1ab02105ea8cc6865482be5abdf04a15e3 Mon Sep 17 00:00:00 2001 From: Giovanni Maruzzelli Date: Wed, 27 Oct 2010 09:12:17 -0500 Subject: [PATCH] skypopen: interface DOWN during hangup, cosmetics --- src/mod/endpoints/mod_skypopen/mod_skypopen.c | 4 ++-- src/mod/endpoints/mod_skypopen/skypopen_protocol.c | 12 ++++++------ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/mod/endpoints/mod_skypopen/mod_skypopen.c b/src/mod/endpoints/mod_skypopen/mod_skypopen.c index 03acda6744..2e0187149d 100644 --- a/src/mod/endpoints/mod_skypopen/mod_skypopen.c +++ b/src/mod/endpoints/mod_skypopen/mod_skypopen.c @@ -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; } diff --git a/src/mod/endpoints/mod_skypopen/skypopen_protocol.c b/src/mod/endpoints/mod_skypopen/skypopen_protocol.c index 62e77dca2d..e8e5ef4bad 100644 --- a/src/mod/endpoints/mod_skypopen/skypopen_protocol.c +++ b/src/mod/endpoints/mod_skypopen/skypopen_protocol.c @@ -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;