mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-05-03 20:46:28 +00:00
Merge branch 'master' into belle-sip
This commit is contained in:
commit
644008c629
5 changed files with 15 additions and 13 deletions
|
|
@ -244,6 +244,8 @@ static LPC_COMMAND commands[] = {
|
|||
"'firewall none' : use direct connection.\n"
|
||||
"'firewall nat' : use nat address given with the 'nat' command.\n"
|
||||
"'firewall stun' : use stun server given with the 'stun' command.\n"
|
||||
"'firewall ice' : use ice.\n"
|
||||
"'firewall upnp' : use uPnP IGD.\n"
|
||||
},
|
||||
{ "call-logs", lpc_cmd_call_logs, "Calls history", NULL },
|
||||
{ "friend", lpc_cmd_friend, "Manage friends",
|
||||
|
|
@ -850,6 +852,10 @@ lpc_cmd_firewall(LinphoneCore *lc, char *args)
|
|||
{
|
||||
linphone_core_set_firewall_policy(lc,LinphonePolicyNoFirewall);
|
||||
}
|
||||
else if (strcmp(args,"upnp")==0)
|
||||
{
|
||||
linphone_core_set_firewall_policy(lc,LinphonePolicyUseUpnp);
|
||||
}
|
||||
else if (strcmp(args,"ice")==0)
|
||||
{
|
||||
setting = linphone_core_get_stun_server(lc);
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
#include <net/if.h>
|
||||
#include <ifaddrs.h>
|
||||
#endif
|
||||
|
||||
#include <math.h>
|
||||
|
||||
#if !defined(WIN32)
|
||||
|
||||
|
|
@ -244,7 +244,7 @@ static double get_audio_payload_bandwidth(LinphoneCore *lc, const PayloadType *p
|
|||
}
|
||||
|
||||
void linphone_core_update_allocated_audio_bandwidth_in_call(LinphoneCall *call, const PayloadType *pt){
|
||||
call->audio_bw=(int)(get_audio_payload_bandwidth(call->core,pt)/1000.0);
|
||||
call->audio_bw=(int)(ceil(get_audio_payload_bandwidth(call->core,pt)/1000.0)); /*rounding codec bandwidth should be avoid, specially for AMR*/
|
||||
ms_message("Audio bandwidth for this call is %i",call->audio_bw);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -313,10 +313,9 @@ int offer_answer_initiate_incoming(const SalMediaDescription *local_capabilities
|
|||
}else ms_warning("Unknown protocol for mline %i, declining",i);
|
||||
if (ls){
|
||||
initiate_incoming(ls,rs,&result->streams[i],one_matching_codec);
|
||||
result->n_active_streams++;
|
||||
}
|
||||
else {
|
||||
/* create an inactive stream for the answer, as there where no matching stream a local capability */
|
||||
if (result->streams[i].rtp_port!=0) result->n_active_streams++;
|
||||
}else {
|
||||
/* create an inactive stream for the answer, as there where no matching stream in local capabilities */
|
||||
result->streams[i].dir=SalStreamInactive;
|
||||
result->streams[i].rtp_port=0;
|
||||
result->streams[i].type=rs->type;
|
||||
|
|
|
|||
|
|
@ -309,15 +309,14 @@ void linphone_upnp_context_destroy(UpnpContext *lupnp) {
|
|||
ms_message("uPnP IGD: Wait all pending port bindings ...");
|
||||
ms_cond_wait(&lupnp->empty_cond, &lupnp->mutex);
|
||||
}
|
||||
ms_mutex_unlock(&lupnp->mutex);
|
||||
|
||||
if(lupnp->upnp_igd_ctxt != NULL) {
|
||||
// upnp_igd_destroy is synchronous so the callbacks will be called in the same thread.
|
||||
// So release the mutex before upnp_igd_destroy call.
|
||||
ms_mutex_unlock(&lupnp->mutex);
|
||||
upnp_igd_destroy(lupnp->upnp_igd_ctxt);
|
||||
ms_mutex_lock(&lupnp->mutex);
|
||||
lupnp->upnp_igd_ctxt = NULL;
|
||||
}
|
||||
|
||||
/* No more multi threading here */
|
||||
|
||||
/* Run one more time configuration update and proxy */
|
||||
linphone_upnp_update_config(lupnp);
|
||||
|
|
@ -345,8 +344,6 @@ void linphone_upnp_context_destroy(UpnpContext *lupnp) {
|
|||
ms_list_for_each(lupnp->pending_bindings,(void (*)(void*))linphone_upnp_port_binding_release);
|
||||
lupnp->pending_bindings = ms_list_free(lupnp->pending_bindings);
|
||||
|
||||
ms_mutex_unlock(&lupnp->mutex);
|
||||
|
||||
ms_mutex_destroy(&lupnp->mutex);
|
||||
ms_cond_destroy(&lupnp->empty_cond);
|
||||
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
Subproject commit 7a11d31f5cab97ff0de373d617720bb651d19b7d
|
||||
Subproject commit 8d85a5ded3b18e2d3d4ba22ee75e0f1ef9c0f739
|
||||
Loading…
Add table
Reference in a new issue