Module: sip-router Branch: master Commit: 4a0b559062b70c1c089c1ea9908eaae60679ad04 URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=4a0b5590...
Author: Daniel-Constantin Mierla miconda@gmail.com Committer: Daniel-Constantin Mierla miconda@gmail.com Date: Fri Nov 12 12:22:20 2010 +0100
sanity: note about different behavior based on autodrop
---
modules/sanity/README | 15 +++++++++------ modules/sanity/doc/functions.xml | 12 +++++++----- 2 files changed, 16 insertions(+), 11 deletions(-)
diff --git a/modules/sanity/README b/modules/sanity/README index a3e4ce1..0442064 100644 --- a/modules/sanity/README +++ b/modules/sanity/README @@ -20,7 +20,7 @@ Nils Ohlmeier
1.4. Functions
- 1.4.1. sanity_check() + 1.4.1. sanity_check([msg_checks [, uri_checks]])
1.1. Overview
@@ -136,12 +136,15 @@ modparam("sanity", "autodrop", 1) Revision History Revision $Revision$ $Date$
-1.4.1. sanity_check() +1.4.1. sanity_check([msg_checks [, uri_checks]])
- This function makes a row of sanity checks on the given request. The - function returns false (-1) if one of the checks failed. If one of the - checks fails the module sends a precise error reply via sl_send_reply. - Thus there is no need to reply with a generic error message. + This function makes a row of sanity checks over the given SIP request. + The behavior of the function is also controled by 'autodrop' parameter. + If autodrop=0, the function returns false (-1) if one of the checks + failed. When autodrop=1, the function stops the execution of + configuration file. In both cases, ff one of the checks fails the + module sends a precise error reply via SL send_reply(). Thus there is + no need to reply with a generic error message.
Example 5. sanity_check usage ... diff --git a/modules/sanity/doc/functions.xml b/modules/sanity/doc/functions.xml index ea9cf1d..f3cfa85 100644 --- a/modules/sanity/doc/functions.xml +++ b/modules/sanity/doc/functions.xml @@ -22,13 +22,15 @@
<section id="sanity_check"> <title> - <function>sanity_check()</function> + <function>sanity_check([msg_checks [, uri_checks]])</function> </title> <para> - This function makes a row of sanity checks on the given request. - The function returns false (-1) if one of the checks failed. If one - of the checks fails the module sends a precise error reply via - sl_send_reply. Thus there is no need to reply with a generic + This function makes a row of sanity checks over the given SIP request. The + behavior of the function is also controled by 'autodrop' parameter. + If autodrop=0, the function returns false (-1) if one of the checks failed. + When autodrop=1, the function stops the execution of configuration file. + In both cases, ff one of the checks fails the module sends a precise error + reply via SL send_reply(). Thus there is no need to reply with a generic error message. </para> <example>