From 92f427df603b6b4843f6e7c264ebf95cb78edc73 Mon Sep 17 00:00:00 2001 From: Thomas Ries Date: Tue, 6 Jul 2004 18:56:44 +0000 Subject: [PATCH] - again: using a port number != 5060 --- ChangeLog | 1 + src/siproxd.c | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 467778d..8575db9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -3,6 +3,7 @@ 06-Jul-2004: - patch from Dan Weber: Open the password file for SIP accounts at startup, so we still have access after chroot()ing. PID filename can be given at command-line. + - again: using a port number != 5060 27-Jun-2004: - fix: in some configurations incoming requests could be sent to a wrong port number. diff --git a/src/siproxd.c b/src/siproxd.c index d52cbfd..32e1f1a 100644 --- a/src/siproxd.c +++ b/src/siproxd.c @@ -404,14 +404,14 @@ int main (int argc, char *argv[]) dest_port= (url->port)?atoi(url->port):SIP_PORT; if ( (get_ip_by_host(url->host, &addr1) == STS_SUCCESS) && - (configuration.sip_listen_port == dest_port) && (get_ip_by_ifname(configuration.inbound_if,&addr2) == STS_SUCCESS) && (get_ip_by_ifname(configuration.outbound_if,&addr3) == STS_SUCCESS)) { - if ((memcmp(&addr1, &addr2, sizeof(addr1)) == 0) || - (memcmp(&addr1, &addr3, sizeof(addr1)) == 0)) { + if ((configuration.sip_listen_port == dest_port) && + ((memcmp(&addr1, &addr2, sizeof(addr1)) == 0) || + (memcmp(&addr1, &addr3, sizeof(addr1)) == 0))) { /* I'm the registrar, send response myself */ sts = register_client(&ticket, 0); sts = register_response(&ticket, sts);