Module: sip-router
Branch: master
Commit: 780decb3b0f8cf140ffdf522abc61e68388ee6a7
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=780decb…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: Sat Oct 6 09:38:57 2012 +0200
core: added mod fix helper fixup_pvar_none(...)
- first parameter is PV and the rest are not fixed up
---
mod_fix.c | 17 +++++++++++++++++
mod_fix.h | 3 +++
2 files changed, 20 insertions(+), 0 deletions(-)
diff --git a/mod_fix.c b/mod_fix.c
index 9064442..dc04d2f 100644
--- a/mod_fix.c
+++ b/mod_fix.c
@@ -342,6 +342,23 @@ int fixup_free_pvar_null(void** param, int param_no)
return fixup_free_pvar_all(param, param_no);
}
+int fixup_pvar_none(void** param, int param_no)
+{
+ if (param_no == 1)
+ return fixup_pvar_all(param, param_no);
+ return 0;
+}
+
+
+
+int fixup_free_pvar_none(void** param, int param_no)
+{
+ if (param_no == 1)
+ return fixup_free_pvar_all(param, param_no);
+ return 0;
+}
+
+
/* must be written "by hand", see above (fixup_pvar_pvar).
FIXUP_F2T(pvar_str, 1, 2, 1, FPARAM_PVS, FPARAM_STR)
FIXUP_F2T(pvar_str_str, 1, 3, 1, FPARAM_PVS, FPARAM_STR)
diff --git a/mod_fix.h b/mod_fix.h
index 9c5863e..c7740d0 100644
--- a/mod_fix.h
+++ b/mod_fix.h
@@ -96,6 +96,9 @@ int fixup_regexpNL_none(void** param, int param_no);
int fixup_pvar_null(void **param, int param_no);
int fixup_free_pvar_null(void** param, int param_no);
+int fixup_pvar_none(void** param, int param_no);
+int fixup_free_pvar_none(void** param, int param_no);
+
int fixup_pvar_pvar(void **param, int param_no);
int fixup_free_pvar_pvar(void** param, int param_no);