]> sjero.net Git - linphone/commitdiff
Update upnp igd, and early destroy upnp session on call fail
authorYann Diorcet <yann.diorcet@belledonne-communications.com>
Tue, 8 Jan 2013 12:56:07 +0000 (13:56 +0100)
committerYann Diorcet <yann.diorcet@belledonne-communications.com>
Tue, 8 Jan 2013 12:56:07 +0000 (13:56 +0100)
coreapi/callbacks.c
coreapi/upnp.c
mediastreamer2

index 3a21e5a6d5fb4aa1e1c8fcdde3cf0db2efaef987..142b4b16300dbbea7d0b39c787300acec220467a 100644 (file)
@@ -628,6 +628,11 @@ static void call_failure(SalOp *op, SalError error, SalReason sr, const char *de
                /*resume to the call that send us the refer automatically*/
                linphone_core_resume_call(lc,call->referer);
        }
+
+#ifdef BUILD_UPNP
+       linphone_call_delete_upnp_session(call);
+#endif //BUILD_UPNP
+
        if (sr == SalReasonDeclined) {
                call->reason=LinphoneReasonDeclined;
                linphone_call_set_state(call,LinphoneCallEnd,"Call declined.");
index 909fca3b376145cae1f2999270d37a5460a0aa02..ff4a1eae2f0520939e7749badd45124f47746709 100644 (file)
@@ -529,6 +529,7 @@ bool_t linphone_core_upnp_hook(void *data) {
                if(port_bindings != NULL) {
                        for(port_bindings_item = port_bindings;port_bindings_item!=NULL;port_bindings_item=port_bindings_item->next) {
                                port_mapping = (UpnpPortBinding *)port_bindings_item->data;
+                               //TODO: Don't send id it's udp/tcp/tls port binding
                                upnp_context_send_remove_port_binding(lc, port_mapping);
                        }
                        ms_list_for_each(port_bindings,(void (*)(void*))upnp_port_binding_release);
index 34de96d6b33f58b248f7d46e9c25edb11e6a5426..f9e4fed0b113f04895ae24a4e40f618e156b3754 160000 (submodule)
@@ -1 +1 @@
-Subproject commit 34de96d6b33f58b248f7d46e9c25edb11e6a5426
+Subproject commit f9e4fed0b113f04895ae24a4e40f618e156b3754