summaryrefslogtreecommitdiff
path: root/src/call.c
diff options
context:
space:
mode:
authorAlfred E. Heggestad <aeh@db.org>2016-06-06 10:14:12 +0200
committerAlfred E. Heggestad <aeh@db.org>2016-06-06 10:14:12 +0200
commit6910d50e9b1e80fe758b259149012e7e062eecd0 (patch)
treeaecd149deed8ae71349e3b2e626e53f57a9c974a /src/call.c
parent362914f55831f4ad3afd7c0cad8f01f2f8b4892c (diff)
net: make networking code re-entrant
- The network instance is now in struct network and does not use any local/static data - A new top-level struct in baresip.c owns the single instance of struct network it is a long-term goal to remove all local/static data from libbaresip and make it fully re-entrant.
Diffstat (limited to 'src/call.c')
-rw-r--r--src/call.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/call.c b/src/call.c
index 913ea25..6d07639 100644
--- a/src/call.c
+++ b/src/call.c
@@ -478,7 +478,8 @@ int call_alloc(struct call **callp, const struct config *cfg, struct list *lst,
goto out;
/* Init SDP info */
- err = sdp_session_alloc(&call->sdp, net_laddr_af(call->af));
+ err = sdp_session_alloc(&call->sdp,
+ net_laddr_af(baresip_network(), call->af));
if (err)
goto out;
@@ -493,7 +494,8 @@ int call_alloc(struct call **callp, const struct config *cfg, struct list *lst,
/* Initialise media NAT handling */
if (acc->mnat) {
- err = acc->mnat->sessh(&call->mnats, net_dnsc(), call->af,
+ err = acc->mnat->sessh(&call->mnats,
+ net_dnsc(baresip_network()), call->af,
acc->stun_host, acc->stun_port,
acc->stun_user, acc->stun_pass,
call->sdp, !got_offer,
@@ -1502,7 +1504,8 @@ int call_reset_transp(struct call *call)
if (!call)
return EINVAL;
- sdp_session_set_laddr(call->sdp, net_laddr_af(call->af));
+ sdp_session_set_laddr(call->sdp,
+ net_laddr_af(baresip_network(), call->af));
return call_modify(call);
}