- again: using a port number != 5060

This commit is contained in:
Thomas Ries
2004-07-06 18:56:44 +00:00
parent 7f9a9b9b30
commit 92f427df60
2 changed files with 4 additions and 3 deletions
+1
View File
@@ -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.
+3 -3
View File
@@ -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);