[calls/wip/detect-network-changes: 3/3] sip: origin: Bind to IPs as given by CallsNetworkWatch
- From: Evangelos Ribeiro Tzaras <devrtz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [calls/wip/detect-network-changes: 3/3] sip: origin: Bind to IPs as given by CallsNetworkWatch
- Date: Sat, 14 Aug 2021 19:29:11 +0000 (UTC)
commit 6aeb7514fbb4fb9ee5cfcac859c66ced267d16cf
Author: Evangelos Ribeiro Tzaras <devrtz fortysixandtwo eu>
Date: Tue Aug 10 15:49:42 2021 +0200
sip: origin: Bind to IPs as given by CallsNetworkWatch
Closes #317
plugins/sip/calls-sip-origin.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/plugins/sip/calls-sip-origin.c b/plugins/sip/calls-sip-origin.c
index edeaadba..9e30f425 100644
--- a/plugins/sip/calls-sip-origin.c
+++ b/plugins/sip/calls-sip-origin.c
@@ -311,10 +311,11 @@ create_inbound (CallsSipOrigin *self,
static void
update_nua (CallsSipOrigin *self)
{
+ CallsNetworkWatch *nw = calls_network_watch_get_default ();
gboolean use_sips = FALSE;
gboolean use_ipv6 = FALSE; /* TODO make configurable or use DNS to figure out if ipv6 is supported*/
- char *ipv6_bind = "*";
- char *ipv4_bind = "0.0.0.0";
+ const char *ipv6_bind = "*";
+ const char *ipv4_bind = "0.0.0.0";
g_autofree char *sip_url = NULL;
g_autofree char *sips_url = NULL;
g_autofree char *from_str = NULL;
@@ -322,6 +323,9 @@ update_nua (CallsSipOrigin *self)
g_assert (CALLS_IS_SIP_ORIGIN (self));
g_assert (self->nua);
+ ipv4_bind = calls_network_watch_get_ipv4 (nw);
+ ipv6_bind = calls_network_watch_get_ipv6 (nw);
+
self->protocol_prefix = get_protocol_prefix (self->transport_protocol);
g_free (self->address);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]