- Local registration was simply broken. Fixed.
This commit is contained in:
@@ -103,7 +103,7 @@ int register_client(osip_message_t *my_msg, int force_lcl_masq) {
|
||||
if (expires_hdr && expires_hdr->hvalue) {
|
||||
expires=atoi(expires_hdr->hvalue);
|
||||
} else {
|
||||
/* it seems the expires filed in not present everywhere... */
|
||||
/* it seems the expires field is not present everywhere... */
|
||||
WARN("no 'expires' header found - set time to 600 sec");
|
||||
expires=600;
|
||||
osip_message_set_expires(my_msg, "600");
|
||||
|
||||
@@ -246,13 +246,15 @@ INFO("got packet [%i bytes]from %s [%s]", i, inet_ntoa(from.sin_addr), tmp);}
|
||||
if (MSG_IS_REGISTER(my_msg) && MSG_IS_REQUEST(my_msg)) {
|
||||
if (access & ACCESSCTL_REG) {
|
||||
osip_uri_t *url;
|
||||
struct in_addr addr1, addr2;
|
||||
struct in_addr addr1, addr2, addr3;
|
||||
|
||||
url = osip_message_get_uri(my_msg);
|
||||
sts = get_ip_by_host(url->host, &addr1);
|
||||
sts = get_ip_by_ifname(configuration.inbound_if,&addr2);
|
||||
sts = get_ip_by_ifname(configuration.outbound_if,&addr3);
|
||||
|
||||
if (memcmp(&addr1, &addr2, sizeof(addr1)) == 0) {
|
||||
if ((memcmp(&addr1, &addr2, sizeof(addr1)) == 0) ||
|
||||
(memcmp(&addr1, &addr3, sizeof(addr1)) == 0)) {
|
||||
/* I'm the registrar, send response myself */
|
||||
sts = register_client(my_msg, 0);
|
||||
sts = register_response(my_msg, sts);
|
||||
|
||||
Reference in New Issue
Block a user