Module: sip-router
Branch: master
Commit: 2d473a9db88327f69c316be42205be4fbed6ca98
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=2d473a9…
Author: oej <oej(a)edvina.net>
Committer: oej <oej(a)edvina.net>
Date: Sun Oct 18 22:28:11 2009 +0200
Doxygen updates
---
modules/topoh/README | 16 ++++++++--------
modules/topoh/doc/topoh_admin.xml | 14 +++++++-------
modules/topoh/th_mask.c | 6 ++++++
modules/topoh/th_mask.h | 7 +++++++
modules/topoh/th_msg.c | 7 +++++++
modules/topoh/th_msg.h | 7 +++++++
modules/topoh/topoh_mod.c | 15 +++++++++++++++
7 files changed, 57 insertions(+), 15 deletions(-)
diff --git a/modules/topoh/README b/modules/topoh/README
index f6bb788..fd5fa13 100644
--- a/modules/topoh/README
+++ b/modules/topoh/README
@@ -70,10 +70,10 @@ Chapter 1. Admin Guide
1. Overview
- This module hides the routing headers that show topology details. It it
- is not affected by the server being transaction stateless or stateful.
- The script interpretor gets the SIP messages decoded, so all
- functionality existing so far is preserved.
+ This module hides the SIP routing headers that show topology details.
+ It it is not affected by the server being transaction stateless or
+ stateful. The script interpreter gets the SIP messages decoded, so all
+ existing functionality is preserved.
The module is transparent for the configuration writer. It only needs
to be loaded (tune the parameters if needed). The SIP server can be
@@ -98,7 +98,7 @@ Chapter 1. Admin Guide
The following libraries or applications must be installed before
running Kamailio with this module loaded:
- * None. In the future the module can be enhnaced to use a stronger
+ * None. In the future the module can be enhanced to use a stronger
encryption algorithm.
3. Exported Parameters
@@ -137,7 +137,7 @@ modparam("topoh", "mask_callid", 1)
3.3. uparam_name (str)
- Name of URI param where to store encoded value.
+ Name of URI parameter where to store encoded value.
Default value is "line".
@@ -148,7 +148,7 @@ modparam("topoh", "uparam_name", "myparam")
3.4. uparam_prefix (str)
- Prefix to be added in encoded URI params.
+ Prefix to be added in encoded URI parameters.
Default value is "sr-".
@@ -159,7 +159,7 @@ modparam("topoh", "uparam_prefix", "xyz")
3.5. vparam_name (str)
- Name of Via: parameter where to store encoded value.
+ Name of Via: parameter used to store encoded value.
Default value is "branch".
diff --git a/modules/topoh/doc/topoh_admin.xml b/modules/topoh/doc/topoh_admin.xml
index 4da3862..ddb2871 100644
--- a/modules/topoh/doc/topoh_admin.xml
+++ b/modules/topoh/doc/topoh_admin.xml
@@ -16,10 +16,10 @@
<section>
<title>Overview</title>
<para>
- This module hides the routing headers that show topology details.
+ This module hides the SIP routing headers that show topology details.
It it is not affected by the server being transaction stateless or
- stateful. The script interpretor gets the SIP messages decoded,
- so all functionality existing so far is preserved.
+ stateful. The script interpreter gets the SIP messages decoded,
+ so all existing functionality is preserved.
</para>
<para>
The module is transparent for the configuration writer. It only needs to be
@@ -57,7 +57,7 @@
<listitem>
<para>
<emphasis>None</emphasis>. In the future the module can be
- enhnaced to use a stronger encryption algorithm.
+ enhanced to use a stronger encryption algorithm.
</para>
</listitem>
</itemizedlist>
@@ -111,7 +111,7 @@ modparam("topoh", "mask_callid", 1)
<section>
<title><varname>uparam_name</varname> (str)</title>
<para>
- Name of URI param where to store encoded value.
+ Name of URI parameter where to store encoded value.
</para>
<para>
<emphasis>
@@ -130,7 +130,7 @@ modparam("topoh", "uparam_name", "myparam")
<section>
<title><varname>uparam_prefix</varname> (str)</title>
<para>
- Prefix to be added in encoded URI params.
+ Prefix to be added in encoded URI parameters.
</para>
<para>
<emphasis>
@@ -149,7 +149,7 @@ modparam("topoh", "uparam_prefix", "xyz")
<section>
<title><varname>vparam_name</varname> (str)</title>
<para>
- Name of Via: parameter where to store encoded value.
+ Name of Via: parameter used to store encoded value.
</para>
<para>
<emphasis>
diff --git a/modules/topoh/th_mask.c b/modules/topoh/th_mask.c
index ad536ce..a960cfb 100644
--- a/modules/topoh/th_mask.c
+++ b/modules/topoh/th_mask.c
@@ -17,6 +17,12 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
+/*!
+ * \file
+ * \brief SIP-router topoh ::
+ * \ingroup lcr
+ * Module: \ref lcr
+ */
#include <string.h>
diff --git a/modules/topoh/th_mask.h b/modules/topoh/th_mask.h
index 6284353..3061dc9 100644
--- a/modules/topoh/th_mask.h
+++ b/modules/topoh/th_mask.h
@@ -18,6 +18,13 @@
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
+/*!
+ * \file
+ * \brief SIP-router topoh ::
+ * \ingroup topoh
+ * Module: \ref topoh
+ */
+
#ifndef _TH_MASK_H_
#define _TH_MASK_H_
diff --git a/modules/topoh/th_msg.c b/modules/topoh/th_msg.c
index eab6a42..9f078f6 100644
--- a/modules/topoh/th_msg.c
+++ b/modules/topoh/th_msg.c
@@ -18,6 +18,13 @@
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
+/*!
+ * \file
+ * \brief SIP-router topoh ::
+ * \ingroup topoh
+ * Module: \ref topoh
+ */
+
#include <string.h>
#include "../../dprint.h"
diff --git a/modules/topoh/th_msg.h b/modules/topoh/th_msg.h
index 6e1fd99..092918b 100644
--- a/modules/topoh/th_msg.h
+++ b/modules/topoh/th_msg.h
@@ -18,6 +18,13 @@
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
+/*!
+ * \file
+ * \brief SIP-router topoh ::
+ * \ingroup topoh
+ * Module: \ref topoh
+ */
+
#ifndef _TH_MSG_H_
#define _TH_MSG_H_
diff --git a/modules/topoh/topoh_mod.c b/modules/topoh/topoh_mod.c
index fdba6a1..c1a8b9c 100644
--- a/modules/topoh/topoh_mod.c
+++ b/modules/topoh/topoh_mod.c
@@ -18,6 +18,21 @@
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
+/*!
+ * \file
+ * \brief SIP-router topoh :: Module interface
+ * \ingroup topoh
+ * Module: \ref topoh
+ */
+
+/*! \defgroup topoh SIP-router :: Topology hiding
+ *
+ * This module hides the SIP routing headers that show topology details.
+ * It it is not affected by the server being transaction stateless or
+ * stateful. The script interpreter gets the SIP messages decoded, so all
+ * existing functionality is preserved.
+ */
+
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
Is there any particular reason for why we always fetch docbook style
sheets over HTTP when running "make README" ?
I can tell you that it doesn't work well with lousy connections. The
result is an empty README file - just a few blank lines.
Maybe we should consider storing the versions we use in the docbook
directory.
/O
Module: sip-router
Branch: master
Commit: e06a69d625d4c1293fceef13f9eca22e14662f9f
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=e06a69d…
Author: Marius Zbihlei <marius.zbihlei(a)1and1.ro>
Committer: Marius Zbihlei <marius.zbihlei(a)1and1.ro>
Date: Mon Oct 12 15:10:55 2009 +0300
If the user parameter is "<null>" (e.g a empty username in the request URI), do not copy this value to the rewritten uri.
This is the case of a REGISTER request. Added statements that the parameters to the actually_rewrite func may not be null.
---
modules/carrierroute/cr_func.c | 31 +++++++++++++++++++++----------
1 files changed, 21 insertions(+), 10 deletions(-)
diff --git a/modules/carrierroute/cr_func.c b/modules/carrierroute/cr_func.c
index 5f4abb5..e4e6d71 100644
--- a/modules/carrierroute/cr_func.c
+++ b/modules/carrierroute/cr_func.c
@@ -267,11 +267,10 @@ static struct route_rule * get_rule_by_hash(const struct route_flags * rf,
/**
* does the work for rewrite_on_rule, writes the new URI into dest
*
- * @param rs the route rule used for rewriting
- * @param dest the returned new destination URI
- * @param msg the sip message
- * @param user the localpart of the uri to be rewritten
- * @param descavp the name of the AVP where the description is stored
+ * @param rs the route rule used for rewriting, not NULL
+ * @param dest the returned new destination URI, not NULL
+ * @param msg the sip message, not NULL
+ * @param user the localpart of the uri to be rewritten, not NULL
*
* @return 0 on success, -1 on failure
*
@@ -284,11 +283,23 @@ static int actually_rewrite(const struct route_rule *rs, str *dest,
int_str avp_val;
int strip = 0;
+ str l_user = *user;
+
strip = (rs->strip > user->len ? user->len : rs->strip);
strip = (strip < 0 ? 0 : strip);
- len = rs->local_prefix.len + user->len + rs->local_suffix.len +
- AT_SIGN.len + rs->host.len - strip;
+ if ( strcmp(user->s, "<null>") == 0 || user->len == 0)
+ {
+ l_user.s = NULL;
+ l_user.len = 0;
+ len = rs->host.len;
+ strip = 0;
+ }
+ else{
+ len = rs->local_prefix.len + l_user.len + rs->local_suffix.len +
+ AT_SIGN.len + rs->host.len - strip;
+ }
+
if (msg->parsed_uri.type == SIPS_URI_T) {
len += SIPS_URI.len;
} else {
@@ -309,11 +320,11 @@ static int actually_rewrite(const struct route_rule *rs, str *dest,
memcpy(p, SIP_URI.s, SIP_URI.len);
p += SIP_URI.len;
}
- if (user->len) {
+ if (l_user.len) {
memcpy(p, rs->local_prefix.s, rs->local_prefix.len);
p += rs->local_prefix.len;
- memcpy(p, user->s + strip, user->len - strip);
- p += user->len - strip;
+ memcpy(p, l_user.s + strip, l_user.len - strip);
+ p += l_user.len - strip;
memcpy(p, rs->local_suffix.s, rs->local_suffix.len);
p += rs->local_suffix.len;
memcpy(p, AT_SIGN.s, AT_SIGN.len);