diff --git a/coreapi/linphonecall.c b/coreapi/linphonecall.c index 8a93953ae..4471af2f1 100644 --- a/coreapi/linphonecall.c +++ b/coreapi/linphonecall.c @@ -1721,6 +1721,9 @@ static void linphone_call_set_terminated(LinphoneCall *call){ if (call->chat_room){ call->chat_room->call = NULL; } + if (lc->calls == NULL){ + ms_bandwidth_controller_reset_state(lc->bw_controller); + } } /*function to be called at each incoming reINVITE, in order to adjust various local parameters to what is being offered by remote: diff --git a/coreapi/linphonecore.c b/coreapi/linphonecore.c index edb59eefe..28972673c 100644 --- a/coreapi/linphonecore.c +++ b/coreapi/linphonecore.c @@ -6218,6 +6218,9 @@ static void set_media_network_reachable(LinphoneCore* lc, bool_t is_media_reacha bctbx_list_for_each(lc->calls, (MSIterateFunc)linphone_call_refresh_sockets); } linphone_core_repair_calls(lc); + if (lc->bw_controller){ + ms_bandwidth_controller_reset_state(lc->bw_controller); + } } }