i'm not down to 3 syntax errors from 600+. here is one of them:
while (1) {
0(7054) WARNING: <core> [cfg.y:2898]: warning in config file, line 1838, column 12: constant value in while(...)
how do i write a while statement where condition is always true?
-- juha
Module: sip-router
Branch: master
Commit: 229fd4f9d5685e1f41c790b7e6b69533d2d9e8f0
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=229fd4f…
Author: Jan Janak <jan(a)iptel.org>
Committer: Jan Janak <jan(a)iptel.org>
Date: Mon Jun 1 17:30:37 2009 +0200
docbook: Generate TOC for root-level section elements
Change the configuration of docbook XSL stylesheet so that they
generate the table of contents even for documents whose root-level
element is <section>. This is needed for docbook documentation in
modules that originate from SER.
---
docbook/html.xsl | 25 +++++++++++++++++++++++++
1 files changed, 25 insertions(+), 0 deletions(-)
diff --git a/docbook/html.xsl b/docbook/html.xsl
index 0468528..2551f41 100644
--- a/docbook/html.xsl
+++ b/docbook/html.xsl
@@ -8,4 +8,29 @@
<!-- Common XHTML customization -->
<xsl:import href="html.common.xsl"/>
+ <!-- Display all subsections in in the toc of READMEs -->
+
+ <!-- Enable TOC for sections -->
+ <xsl:param name="toc.section.depth">4</xsl:param>
+ <xsl:param name="generate.section.toc.level">4</xsl:param>
+
+ <!-- This is the default value of generate.toc modified so that we get TOC
+ in documents whose root element is root, but only for the root
+ section element. Non-root section or sectX elements have been removed
+ so that they never generate a TOC. -->
+ <xsl:param name="generate.toc">
+ appendix toc,title
+ article/appendix nop
+ article toc,title
+ book toc,title,figure,table,example,equation
+ chapter toc,title
+ part toc,title
+ preface toc,title
+ qandadiv toc
+ qandaset toc
+ reference toc,title
+ /section toc
+ set toc,title
+ </xsl:param>
+
</xsl:stylesheet>
Module: sip-router
Branch: tirpi/script_callbacks
Commit: b9ed8d84b2eb5a9af8b1980cea772c0290611513
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=b9ed8d8…
Author: Miklos Tirpak <miklos(a)iptel.org>
Committer: Miklos Tirpak <miklos(a)iptel.org>
Date: Mon Jun 1 15:11:41 2009 +0200
script callbacks: support for failure and branch routes
- Executing pre- and post-script callbacks for failure
routes and branch routes.
---
modules/tm/t_fwd.c | 11 ++++++++---
modules/tm/t_reply.c | 21 ++++++++++++++++-----
modules/tm/t_suspend.c | 16 ++++++++++++----
3 files changed, 36 insertions(+), 12 deletions(-)
diff --git a/modules/tm/t_fwd.c b/modules/tm/t_fwd.c
index 01a3699..d0dd613 100644
--- a/modules/tm/t_fwd.c
+++ b/modules/tm/t_fwd.c
@@ -78,6 +78,7 @@
* t saved, thus, are not available. Set reparse_on_dns_failover
* to 0 to revert the change. (Miklos)
* 2008-06-04 T_CANCELED is now set each time a CANCEL is received (andrei)
+ * 2009-06-01 Pre- and post-script callbacks of branch route are executed (Miklos)
*/
#include "defs.h"
@@ -98,6 +99,7 @@
#include "../../onsend.h"
#include "../../compiler_opt.h"
#include "../../route.h"
+#include "../../script_cb.h"
#include "t_funcs.h"
#include "t_hooks.h"
#include "t_msgbuilder.h"
@@ -191,9 +193,12 @@ static char *print_uac_request( struct cell *t, struct sip_msg *i_req,
/* run branch_route actions if provided */
set_route_type(BRANCH_ROUTE);
tm_ctx_set_branch_index(branch+1);
- if (run_top_route(branch_rt.rlist[branch_route], i_req) < 0) {
- LOG(L_ERR, "ERROR: print_uac_request: Error in run_top_route\n");
- }
+ if (exec_pre_script_cb(i_req, BRANCH_CB_TYPE)>0) {
+ if (run_top_route(branch_rt.rlist[branch_route], i_req) < 0) {
+ LOG(L_ERR, "ERROR: print_uac_request: Error in run_top_route\n");
+ }
+ exec_post_script_cb(i_req, BRANCH_CB_TYPE);
+ }
tm_ctx_set_branch_index(0);
}
diff --git a/modules/tm/t_reply.c b/modules/tm/t_reply.c
index 8ab79c2..e60d046 100644
--- a/modules/tm/t_reply.c
+++ b/modules/tm/t_reply.c
@@ -89,6 +89,7 @@
* 2008-03-12 use cancel_b_method on 6xx (andrei)
* 2008-05-30 make sure the wait timer is started after we don't need t
* anymore to allow safe calls from fr_timer (andrei)
+ * 2009-06-01 Pre- and post-script callbacks of branch route are executed (Miklos)
*
*/
@@ -106,6 +107,7 @@
#include "../../timer.h"
#include "../../error.h"
#include "../../action.h"
+#include "../../script_cb.h"
#include "../../dset.h"
#include "../../tags.h"
#include "../../route.h"
@@ -861,9 +863,12 @@ int run_failure_handlers(struct cell *t, struct sip_msg *rpl,
* on failure */
on_failure = t->on_negative;
t->on_negative=0;
- /* run a reply_route action if some was marked */
- if (run_top_route(failure_rt.rlist[on_failure], &faked_req)<0)
- LOG(L_ERR, "ERROR: run_failure_handlers: Error in run_top_route\n");
+ if (exec_pre_script_cb(&faked_req, FAILURE_CB_TYPE)>0) {
+ /* run a reply_route action if some was marked */
+ if (run_top_route(failure_rt.rlist[on_failure], &faked_req)<0)
+ LOG(L_ERR, "ERROR: run_failure_handlers: Error in run_top_route\n");
+ exec_post_script_cb(&faked_req, FAILURE_CB_TYPE);
+ }
}
/* restore original environment and free the fake msg */
@@ -1963,6 +1968,9 @@ int reply_received( struct sip_msg *p_msg )
backup_domain_from = set_avp_list(AVP_TRACK_FROM | AVP_CLASS_DOMAIN, &t->domain_avps_from );
backup_domain_to = set_avp_list(AVP_TRACK_TO | AVP_CLASS_DOMAIN, &t->domain_avps_to );
setbflagsval(0, uac->branch_flags);
+ /* Pre- and post-script callbacks have already
+ * been execueted by the core. (Miklos)
+ */
if (run_top_route(onreply_rt.rlist[t->on_reply], p_msg)<0)
LOG(L_ERR, "ERROR: on_reply processing failed\n");
/* transfer current message context back to t */
@@ -2090,8 +2098,11 @@ done:
trans_not_found:
/* transaction context was not found */
if (goto_on_sl_reply) {
- /* the script writer has a chance to decide whether to
- forward the reply or not */
+ /* The script writer has a chance to decide whether to
+ * forward the reply or not.
+ * Pre- and post-script callbacks have already
+ * been execueted by the core. (Miklos)
+ */
return run_top_route(onreply_rt.rlist[goto_on_sl_reply], p_msg);
} else {
/* let the core forward the reply */
diff --git a/modules/tm/t_suspend.c b/modules/tm/t_suspend.c
index c1dc1b1..e9802b9 100644
--- a/modules/tm/t_suspend.c
+++ b/modules/tm/t_suspend.c
@@ -27,10 +27,12 @@
* History:
* --------
* 2008-11-10 Initial version (Miklos)
+ * 2009-06-01 Pre- and post-script callbacks of failure route are executed (Miklos)
*
*/
-#include "../../select_buf.h" /* reset_static_buffer() */
+#include "../../action.h"
+#include "../../script_cb.h"
#include "sip_msg.h"
#include "t_reply.h"
@@ -151,9 +153,15 @@ int t_continue(unsigned int hash_index, unsigned int label,
}
faked_env( t, &faked_req);
- if (run_top_route(route, &faked_req)<0)
- LOG(L_ERR, "ERROR: t_continue: Error in run_top_route\n");
-
+ /* The sip msg is a faked msg just like in failure route
+ * therefore execute the pre- and post-script callbacks
+ * of failure route (Miklos)
+ */
+ if (exec_pre_script_cb(&faked_req, FAILURE_CB_TYPE)>0) {
+ if (run_top_route(route, &faked_req)<0)
+ LOG(L_ERR, "ERROR: t_continue: Error in run_top_route\n");
+ exec_pre_script_cb(&faked_req, FAILURE_CB_TYPE);
+ }
/* TODO: save_msg_lumps should clone the lumps to shm mem */
/* restore original environment and free the fake msg */