Module: sip-router
Branch: master
Commit: f8ae37321fde6cb18b334f0abfee830b52fae70c
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=f8ae373…
Author: Ovidiu Sas <osas(a)voipembedded.com>
Committer: Ovidiu Sas <osas(a)voipembedded.com>
Date: Tue Aug 17 10:16:03 2010 -0400
modules_k:nathelper - restore nortpproxy_str parameter
---
modules_k/nathelper/nathelper.c | 13 +++++++++++++
1 files changed, 13 insertions(+), 0 deletions(-)
diff --git a/modules_k/nathelper/nathelper.c b/modules_k/nathelper/nathelper.c
index 1baad10..6a728e0 100644
--- a/modules_k/nathelper/nathelper.c
+++ b/modules_k/nathelper/nathelper.c
@@ -389,6 +389,7 @@ static pv_export_t mod_pvs[] = {
static param_export_t params[] = {
{"natping_interval", INT_PARAM, &natping_interval },
{"ping_nated_only", INT_PARAM, &ping_nated_only },
+ {"nortpproxy_str", STR_PARAM, &nortpproxy_str.s },
{"received_avp", STR_PARAM, &rcv_avp_param },
{"force_socket", STR_PARAM, &force_socket_str },
{"sipping_from", STR_PARAM, &sipping_from.s },
@@ -586,6 +587,18 @@ mod_init(void)
return -1;
}
+ if (nortpproxy_str.s==NULL || nortpproxy_str.s[0]==0) {
+ nortpproxy_str.len = 0;
+ nortpproxy_str.s = NULL;
+ } else {
+ nortpproxy_str.len = strlen(nortpproxy_str.s);
+ while (nortpproxy_str.len > 0 && (nortpproxy_str.s[nortpproxy_str.len - 1]
== '\r' ||
+ nortpproxy_str.s[nortpproxy_str.len - 1] == '\n'))
+ nortpproxy_str.len--;
+ if (nortpproxy_str.len == 0)
+ nortpproxy_str.s = NULL;
+ }
+
if (natping_interval > 0) {
bind_usrloc = (bind_usrloc_t)find_export("ul_bind_usrloc", 1, 0);
if (!bind_usrloc) {