- Local registration was simply broken. Fixed.

This commit is contained in:
Thomas Ries 2003-10-12 10:12:55 +00:00
parent 49b237db3f
commit f50abc56ad
4 changed files with 17 additions and 4 deletions

View File

@ -1,3 +1,7 @@
0.4.0a
======
12-Oct-2003: - Local registration was simply broken. Fixed.
0.4.0
=====
11-Oct-2003: - released 0.4.0

View File

@ -62,9 +62,16 @@ Known bugs:
-----
md5sum for siproxd-0.4.0.tar.gz:
md5sum for siproxd-0.4.0.tar.gz: 3cbf1ac50f122142ce8529e09d2f8796
GnuPG signature for siproxd-0.4.0.tar.gz archive:
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)
iD8DBQA/h86xCfzBioe83JQRAtVCAJ4nRI/gTWZBDGtRjJn4hIIaH0tf0ACfZiT0
X5xlKUBA2O5x2RnKTwt6n6o=
=LXMi
-----END PGP SIGNATURE-----
GnuPG: pub 1024D/87BCDC94 2000-03-19 Thomas Ries <tries@gmx.net>

View File

@ -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");

View File

@ -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);