From cb967d302072cef88b0689885a9f0c69cd41e850 Mon Sep 17 00:00:00 2001 From: Alexandre Savard <alexandresavard@alexandresavard-desktop.(none)> Date: Mon, 4 Jan 2010 14:54:10 -0500 Subject: [PATCH] [#2623] Use interface instead of local address in CreateUDPServer --- sflphone-common/src/sip/sipvoiplink.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/sflphone-common/src/sip/sipvoiplink.cpp b/sflphone-common/src/sip/sipvoiplink.cpp index 87e546317c..92fb8973cc 100644 --- a/sflphone-common/src/sip/sipvoiplink.cpp +++ b/sflphone-common/src/sip/sipvoiplink.cpp @@ -2229,7 +2229,7 @@ int SIPVoIPLink::createUDPServer (AccountID id) _debug("Found account %s in map", account->getAccountID().c_str()); if (account->getLocalAddress () != "default") { - listeningAddress = getInterfaceAddrFromName(account->getLocalAddress()); + listeningAddress = getInterfaceAddrFromName(account->getLocalInterface()); } listeningPort = account->getLocalPort (); @@ -2239,13 +2239,14 @@ int SIPVoIPLink::createUDPServer (AccountID id) pj_str_t temporary_address; - // Init bound address to ANY - if (account && account->getLocalAddress () == "default") { + if (account && account->getLocalInterface () == "default") { + // Init bound address to ANY bound_addr.sin_addr.s_addr = pj_htonl (PJ_INADDR_ANY); } else { - // bind this account to a specific interface + + // bind this account to a specific interface pj_strdup2(_pool, &temporary_address, listeningAddress.c_str()); bound_addr.sin_addr = pj_inet_addr(&temporary_address); } -- GitLab