Module: sip-router
Branch: tirpi/script_callbacks
Commit: d14f231501cedebd1d9c5956a98aec5f01b6413c
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=d14f231…
Author: Miklos Tirpak <miklos(a)iptel.org>
Committer: Miklos Tirpak <miklos(a)iptel.org>
Date: Mon Jun 1 17:33:38 2009 +0200
script callbacks: corrections
- callbacks have been tested, bugs found have
been corrected.
---
script_cb.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/script_cb.c b/script_cb.c
index 729eda4..c715dc8 100644
--- a/script_cb.c
+++ b/script_cb.c
@@ -160,8 +160,8 @@ int exec_pre_script_cb( struct sip_msg *msg, enum script_cb_type
type)
abort();
}
#endif
- flags = PRE_SCRIPT_CB & (1<<(type-1));
- for (cb=pre_script_cb[type]; cb ; cb=cb->next ) {
+ flags = PRE_SCRIPT_CB | (1<<(type-1));
+ for (cb=pre_script_cb[type-1]; cb ; cb=cb->next ) {
/* stop on error */
if (cb->cbf(msg, flags, cb->param)==0)
return 0;
@@ -183,8 +183,8 @@ int exec_post_script_cb( struct sip_msg *msg, enum script_cb_type
type)
abort();
}
#endif
- flags = POST_SCRIPT_CB & (1<<(type-1));
- for (cb=post_script_cb[type]; cb ; cb=cb->next){
+ flags = POST_SCRIPT_CB | (1<<(type-1));
+ for (cb=post_script_cb[type-1]; cb ; cb=cb->next){
cb->cbf(msg, flags, cb->param);
}
return 1;