While compiling app_python on CentOS I got the following warnings:
+ make every-module group_include=kpython
CC (gcc) [M app_python.so] python_exec.o
CC (gcc) [M app_python.so] python_iface.o
CC (gcc) [M app_python.so] python_mod.o
CC (gcc) [M app_python.so] python_msgobj.o
python_msgobj.c: In function 'msg_set_dst_uri':
python_msgobj.c:151: warning: implicit declaration of function 'ruri_mark_new'
python_msgobj.c: In function 'python_msgobj_init':
python_msgobj.c:529: warning: dereferencing type-punned pointer will
break strict-aliasing rules
CC (gcc) [M app_python.so] python_support.o
LD (gcc) [M app_python.so] app_python.so
Regards,
Ovidiu Sas
Module: sip-router
Branch: master
Commit: d5b8c86bfacdf495cdd46e6a306d7aee02d3dfb2
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=d5b8c86…
Author: Andrei Pelinescu-Onciul <andrei(a)iptel.org>
Committer: Andrei Pelinescu-Onciul <andrei(a)iptel.org>
Date: Mon Oct 4 19:34:22 2010 +0200
registrar(s): by default trust contact received info
- by default trust contact received info (to maintain
compatibility with old configs).
- the possible settings for the trust_received_flag modparam are:
* -2 (default) - always trust contact received info (added when
replicating REGISTERs)
* -1 - disable (never trust received info)
* >=0 - trust only the messages with the corresponding flag
set (it can also be a flag name).
---
modules_s/registrar/reg_mod.c | 7 +++++--
modules_s/registrar/save.c | 18 ++++++++++++------
2 files changed, 17 insertions(+), 8 deletions(-)
diff --git a/modules_s/registrar/reg_mod.c b/modules_s/registrar/reg_mod.c
index b8f87e4..f623d1b 100644
--- a/modules_s/registrar/reg_mod.c
+++ b/modules_s/registrar/reg_mod.c
@@ -67,9 +67,12 @@ int append_branches = 1; /* If set to 1, lookup will put all contac
int case_sensitive = 0; /* If set to 1, username in aor will be case sensitive */
int save_nat_flag = 4; /* The contact will be marked as behind NAT if this flag is set before calling save */
int load_nat_flag = 4; /* This flag will be set by lookup if a contact is behind NAT*/
-int trust_received_flag = -1; /* if this flag is set, a contact
+int trust_received_flag = -2; /* if this flag is set (>=0), a contact
received param. will be trusted
- (otherwise it will be ignored) */
+ (otherwise it will be ignored)
+ -1 = disable
+ -2 = trust all.
+ */
int min_expires = 60; /* Minimum expires the phones are allowed to use in seconds,
* use 0 to switch expires checking off */
int max_expires = 0; /* Minimum expires the phones are allowed to use in seconds,
diff --git a/modules_s/registrar/save.c b/modules_s/registrar/save.c
index 08fcb9f..f87fd3c 100644
--- a/modules_s/registrar/save.c
+++ b/modules_s/registrar/save.c
@@ -420,8 +420,10 @@ static inline int insert(struct sip_msg* _m, str* aor, contact_t* _c, udomain_t*
}
send_sock = 0;
- if (_c->received && (trust_received_flag >=0) &&
- (isflagset(_m, trust_received_flag) == 1)) {
+ if (_c->received &&
+ (((trust_received_flag >= 0) &&
+ (isflagset(_m, trust_received_flag) == 1)) ||
+ (trust_received_flag == -2)) ) {
recv = &_c->received->body;
send_sock = find_send_socket(recv);
} else if (flags & FL_NAT && _m->first_line.type == SIP_REQUEST) {
@@ -591,8 +593,10 @@ static inline int update(struct sip_msg* _m, urecord_t* _r, str* aor, contact_t*
}
send_sock = 0;
- if (_c->received && (trust_received_flag >=0) &&
- (isflagset(_m, trust_received_flag) == 1)) {
+ if (_c->received &&
+ (((trust_received_flag >=0 ) &&
+ (isflagset(_m, trust_received_flag) == 1)) ||
+ (trust_received_flag == -2)) ) {
recv = &_c->received->body;
send_sock = find_send_socket(recv);
} else if (nated & FL_NAT &&
@@ -649,8 +653,10 @@ static inline int update(struct sip_msg* _m, urecord_t* _r, str* aor, contact_t*
}
send_sock = 0;
- if (_c->received && (trust_received_flag >=0) &&
- (isflagset(_m, trust_received_flag) == 1)) {
+ if (_c->received &&
+ (((trust_received_flag >=0 ) &&
+ (isflagset(_m, trust_received_flag) == 1)) ||
+ (trust_received_flag == -2)) ) {
recv = &_c->received->body;
send_sock = find_send_socket(recv);
} else if (nated & FL_NAT && _m->first_line.type == SIP_REQUEST) {
Module: sip-router
Branch: master
Commit: a7d84df08c2ef8f420db4df8c4110b969cd8de9f
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=a7d84df…
Author: Andrei Pelinescu-Onciul <andrei(a)iptel.org>
Committer: Andrei Pelinescu-Onciul <andrei(a)iptel.org>
Date: Mon Oct 4 18:39:50 2010 +0200
registrar(s): set send socket if uri includes received info
- set send socket when the contact includes received info
(replication for NATed contacts)
- use contact received information only if the trust_received_flag
is set for the message (the flag actually used can be set with
the modparam with the same name).
---
modules_s/registrar/reg_mod.c | 14 ++++
modules_s/registrar/reg_mod.h | 1 +
modules_s/registrar/save.c | 139 +++++++++++++++++++++++++++++++++++++----
3 files changed, 142 insertions(+), 12 deletions(-)
Diff: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commitdiff;h=a7d…