]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
skypopen: interface DOWN during hangup, cosmetics
authorGiovanni Maruzzelli <gmaruzz@gmail.com>
Wed, 27 Oct 2010 14:12:17 +0000 (09:12 -0500)
committerGiovanni Maruzzelli <gmaruzz@gmail.com>
Wed, 27 Oct 2010 14:44:52 +0000 (09:44 -0500)
src/mod/endpoints/mod_skypopen/mod_skypopen.c
src/mod/endpoints/mod_skypopen/skypopen_protocol.c

index 03acda67448251443e4a33b38044c2c9c001f32c..2e0187149d4187f824cc176a6bd951345f931b77 100644 (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;
                }
index 62e77dca2d520e62196086599203cf1daa23ea54..e8e5ef4badb194b81aeb9cc4ebc61ebd62769906 100644 (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;