Module: sip-router
Branch: master
Commit: eb73f14958ede24928f312fa0e44d171fa7bf373
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=eb73f14…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: Thu Aug 30 22:34:40 2012 +0200
kex: removed km_append_branch() cfg funtion
- functionalty being replaced by append_branch() from corex module which
can take also Q as parameter
---
modules_k/kex/README | 62 +++++++++++++++------------------------
modules_k/kex/doc/kex_admin.xml | 39 +++++-------------------
modules_k/kex/kex_mod.c | 4 --
modules_k/kex/km_core.c | 34 ---------------------
modules_k/kex/km_core.h | 1 -
5 files changed, 32 insertions(+), 108 deletions(-)
diff --git a/modules_k/kex/README b/modules_k/kex/README
index 9c88c6b..89b3197 100644
--- a/modules_k/kex/README
+++ b/modules_k/kex/README
@@ -11,7 +11,7 @@ Daniel-Constantin Mierla
<miconda(a)gmail.com>
- Copyright © 2009 Daniel-Constantin Mierla
+ Copyright � 2009 Daniel-Constantin Mierla
__________________________________________________________________
Table of Contents
@@ -62,14 +62,13 @@ Daniel-Constantin Mierla
1.4. setbflag usage
1.5. setbflag usage
1.6. resetsflag usage
- 1.7. km_append_branch usage
- 1.8. >setdsturi usage
- 1.9. >resetdsturi usage
- 1.10. >isdsturiset usage
- 1.11. >pv_printf usage
- 1.12. >is_myself usage
- 1.13. setdebug usage
- 1.14. >resetdebug usage
+ 1.7. setdsturi usage
+ 1.8. resetdsturi usage
+ 1.9. isdsturiset usage
+ 1.10. pv_printf usage
+ 1.11. is_myself usage
+ 1.12. setdebug usage
+ 1.13. resetdebug usage
Chapter 1. Admin Guide
@@ -263,21 +262,8 @@ resetbflag("1");
3.7. km_append_branch([uri])
- Append a new branch to SIP request.
-
- Meaning of the parameters is as follows:
- * uri - SIP URI of the new destination. If omitted then the R-URI is
- used. It can be static string or a string with pseudo-variables
- that will be evaluated at runtime.
-
- This function can be used from REQUEST_ROUTE and FAILURE_ROUTE.
-
- Example 1.7. km_append_branch usage
-...
-km_append_branch();
-...
-km_append_branch("sip:alice@sip-router.org");
-...
+ It was replaced by append_branch() from corex module, starting with
+ version 3.4.0.
3.8. setdsturi(uri)
@@ -291,7 +277,7 @@ km_append_branch("sip:alice@sip-router.org");
This function can be used from ANY_ROUTE.
- Example 1.8. >setdsturi usage
+ Example 1.7. setdsturi usage
...
setdsturi("sip:10.0.0.10");
...
@@ -302,7 +288,7 @@ setdsturi("sip:10.0.0.10");
This function can be used from ANY_ROUTE.
- Example 1.9. >resetdsturi usage
+ Example 1.8. resetdsturi usage
...
resetdsturi();
...
@@ -313,7 +299,7 @@ resetdsturi();
This function can be used from ANY_ROUTE.
- Example 1.10. >isdsturiset usage
+ Example 1.9. isdsturiset usage
...
if(isdsturiset())
{
@@ -334,7 +320,7 @@ if(isdsturiset())
This function can be used from ANY_ROUTE.
- Example 1.11. >pv_printf usage
+ Example 1.10. pv_printf usage
...
pv_printf("$ru", "sip:$rU@$fd");
pv_printf("$avp(x)", "From: $fU - To: $tU");
@@ -352,7 +338,7 @@ pv_printf("$avp(x)", "From: $fU - To: $tU");
This function can be used from ANY_ROUTE.
- Example 1.12. >is_myself usage
+ Example 1.11. is_myself usage
...
if(is_myself("$fu")) {
...
@@ -369,7 +355,7 @@ if(is_myself("$fu")) {
This function can be used from ANY_ROUTE.
- Example 1.13. setdebug usage
+ Example 1.12. setdebug usage
...
setdebug("1");
...
@@ -384,7 +370,7 @@ setdebug("$var(level)");
This function can be used from ANY_ROUTE.
- Example 1.14. >resetdebug usage
+ Example 1.13. resetdebug usage
...
resetdebug();
...
@@ -398,7 +384,7 @@ resetdebug();
4.5. version
4.6. which
-4.1. arg
+4.1. arg
Print command line arguments.
@@ -410,7 +396,7 @@ resetdebug();
:arg:_reply_fifo_file_
_empty_line_
-4.2. kill
+4.2. kill
Kill the application.
@@ -422,7 +408,7 @@ resetdebug();
:kill:_reply_fifo_file_
_empty_line_
-4.3. pwd
+4.3. pwd
Print working directory.
@@ -434,7 +420,7 @@ resetdebug();
:pwd:_reply_fifo_file_
_empty_line_
-4.4. uptime
+4.4. uptime
Print uptime.
@@ -446,7 +432,7 @@ resetdebug();
:uptime:_reply_fifo_file_
_empty_line_
-4.5. version
+4.5. version
Print version information.
@@ -458,7 +444,7 @@ resetdebug();
:version:_reply_fifo_file_
_empty_line_
-4.6. which
+4.6. which
Print list of available MI commands.
@@ -474,7 +460,7 @@ resetdebug();
5.1. pkg.stats
-5.1. pkg.stats
+5.1. pkg.stats
Print private memory (pkg) usage statistics per process. It can take
optinally a filter to print statistics only for a specific process or
diff --git a/modules_k/kex/doc/kex_admin.xml b/modules_k/kex/doc/kex_admin.xml
index f651361..02a27a6 100644
--- a/modules_k/kex/doc/kex_admin.xml
+++ b/modules_k/kex/doc/kex_admin.xml
@@ -250,32 +250,9 @@ resetbflag("1");
<section>
<title><function
moreinfo="none">km_append_branch([uri])</function></title>
<para>
- Append a new branch to SIP request.
+ It was replaced by append_branch() from corex module, starting with
+ version 3.4.0.
</para>
- <para>Meaning of the parameters is as follows:</para>
- <itemizedlist>
- <listitem>
- <para>
- <emphasis>uri</emphasis> - SIP URI of the new destination. If
- omitted then the R-URI is used. It can be static string or
- a string with pseudo-variables that will be evaluated at
- runtime.
- </para>
- </listitem>
- </itemizedlist>
- <para>
- This function can be used from REQUEST_ROUTE and FAILURE_ROUTE.
- </para>
- <example>
- <title><function>km_append_branch</function> usage</title>
- <programlisting format="linespecific">
-...
-km_append_branch();
-...
-km_append_branch("sip:alice@sip-router.org");
-...
-</programlisting>
- </example>
</section>
<section>
<title><function
moreinfo="none">setdsturi(uri)</function></title>
@@ -297,7 +274,7 @@ km_append_branch("sip:alice@sip-router.org");
This function can be used from ANY_ROUTE.
</para>
<example>
- <title><function>>setdsturi</function> usage</title>
+ <title><function>setdsturi</function> usage</title>
<programlisting format="linespecific">
...
setdsturi("sip:10.0.0.10");
@@ -314,7 +291,7 @@ setdsturi("sip:10.0.0.10");
This function can be used from ANY_ROUTE.
</para>
<example>
- <title><function>>resetdsturi</function> usage</title>
+ <title><function>resetdsturi</function> usage</title>
<programlisting format="linespecific">
...
resetdsturi();
@@ -332,7 +309,7 @@ resetdsturi();
This function can be used from ANY_ROUTE.
</para>
<example>
- <title><function>>isdsturiset</function> usage</title>
+ <title><function>isdsturiset</function> usage</title>
<programlisting format="linespecific">
...
if(isdsturiset())
@@ -368,7 +345,7 @@ if(isdsturiset())
This function can be used from ANY_ROUTE.
</para>
<example>
- <title><function>>pv_printf</function> usage</title>
+ <title><function>pv_printf</function> usage</title>
<programlisting format="linespecific">
...
pv_printf("$ru", "sip:$rU@$fd");
@@ -397,7 +374,7 @@ pv_printf("$avp(x)", "From: $fU - To: $tU");
This function can be used from ANY_ROUTE.
</para>
<example>
- <title><function>>is_myself</function> usage</title>
+ <title><function>is_myself</function> usage</title>
<programlisting format="linespecific">
...
if(is_myself("$fu")) {
@@ -446,7 +423,7 @@ setdebug("$var(level)");
This function can be used from ANY_ROUTE.
</para>
<example>
- <title><function>>resetdebug</function> usage</title>
+ <title><function>resetdebug</function> usage</title>
<programlisting format="linespecific">
...
resetdebug();
diff --git a/modules_k/kex/kex_mod.c b/modules_k/kex/kex_mod.c
index ad3cc1d..8dafb7f 100644
--- a/modules_k/kex/kex_mod.c
+++ b/modules_k/kex/kex_mod.c
@@ -87,10 +87,6 @@ static cmd_export_t cmds[]={
0, ANY_ROUTE },
{"isbflagset", (cmd_function)w_isbflagset, 2,fixup_igp_igp,
0, ANY_ROUTE },
- {"km_append_branch", (cmd_function)w_km_append_branch, 0, 0,
- 0, REQUEST_ROUTE | FAILURE_ROUTE },
- {"km_append_branch", (cmd_function)w_km_append_branch, 1, fixup_spve_null,
- 0, REQUEST_ROUTE | FAILURE_ROUTE },
{"setdsturi", (cmd_function)w_setdsturi, 1, 0,
0, ANY_ROUTE },
{"resetdsturi", (cmd_function)w_resetdsturi, 0, 0,
diff --git a/modules_k/kex/km_core.c b/modules_k/kex/km_core.c
index 5a0bee6..1e6b0da 100644
--- a/modules_k/kex/km_core.c
+++ b/modules_k/kex/km_core.c
@@ -32,40 +32,6 @@
#include "../../mod_fix.h"
#include "km_core.h"
-int w_km_append_branch(struct sip_msg *msg, char *uri, str *sq)
-{
- str suri;
- int ret;
- int q = Q_UNSPECIFIED;
- flag_t branch_flags = 0;
-
- getbflagsval(0, &branch_flags);
- if (uri==NULL) {
- ret = km_append_branch(msg, 0, &msg->dst_uri, &msg->path_vec,
- q, branch_flags, msg->force_send_socket);
- /* reset all branch info */
- reset_force_socket(msg);
- setbflagsval(0, 0);
- if(msg->dst_uri.s!=0)
- pkg_free(msg->dst_uri.s);
- msg->dst_uri.s = 0;
- msg->dst_uri.len = 0;
- if(msg->path_vec.s!=0)
- pkg_free(msg->path_vec.s);
- msg->path_vec.s = 0;
- msg->path_vec.len = 0;
- } else {
- if(fixup_get_svalue(msg, (gparam_p)uri, &suri)!=0)
- {
- LM_ERR("cannot get the URI parameter\n");
- return -1;
- }
- ret = km_append_branch(msg, &suri, &msg->dst_uri,
- &msg->path_vec, q, branch_flags,
- msg->force_send_socket);
- }
- return ret;
-}
int w_setdsturi(struct sip_msg *msg, char *uri, str *s2)
{
diff --git a/modules_k/kex/km_core.h b/modules_k/kex/km_core.h
index 5fa08f8..c8e23f3 100644
--- a/modules_k/kex/km_core.h
+++ b/modules_k/kex/km_core.h
@@ -25,7 +25,6 @@
#include "../../sr_module.h"
-int w_km_append_branch(struct sip_msg *msg, char *uri, str *s2);
int w_setdsturi(struct sip_msg *msg, char *uri, str *s2);
int w_resetdsturi(struct sip_msg *msg, char *uri, str *s2);
int w_isdsturiset(struct sip_msg *msg, char *uri, str *s2);