Module: sip-router
Branch: andrei/fixups
Commit: e692101f920b5221112fcf0dd688c64dfbcfe3b4
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=e692101…
Author: Andrei Pelinescu-Onciul <andrei(a)iptel.org>
Committer: Andrei Pelinescu-Onciul <andrei(a)iptel.org>
Date: Fri Nov 21 11:49:48 2008 +0100
fixups: call them even for 0 params. functions
- kamailio compatibility: fixups for function with no parameters
can be used
---
route.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/route.c b/route.c
index 5c39764..b57364b 100644
--- a/route.c
+++ b/route.c
@@ -512,6 +512,11 @@ static int fix_actions(struct action* a)
if (cmd && cmd->c.fixup) {
int i;
DBG("fixing %s()\n", cmd->c.name);
+ if (t->val[1].u.number==0) {
+ ret = cmd->c.fixup(0, 0);
+ if (ret < 0)
+ return ret;
+ }
/* type cast NUMBER to STRING, old modules may expect
* all STRING params during fixup */
for (i=0; i<t->val[1].u.number; i++) {
siputils is the first kamailio module that did succesfully run on
sip-core.
I did only 2 small changes:
- added DEFS+=-DKAMAILIO_MOD_INTERFACE to the Makefile
- s/MIN/MIN_int
There are a few modules that would need a little bit more changes, like
everything using core send functions (they changed a bit in ser),
do_action() and build_*, but in all this cases these are minor updates.
More will be compileable as soon as we unify the fixups, but I think the
biggest problem right now is the DB interface (from a module point
of view, we still haven't unified the config file).
Andrei