Module: sip-router
Branch: master
Commit: e11893c8a7abdd68b1186afc6a7b8594aee19c69
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=e11893c…
Author: Alex Hermann <alex(a)speakup.nl>
Committer: Alex Hermann <alex(a)speakup.nl>
Date: Fri Jun 10 12:56:11 2011 +0200
core: Add fixup_pvar_uint helper function
---
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 0ff29d9..8ea5211 100644
--- a/mod_fix.c
+++ b/mod_fix.c
@@ -395,6 +395,23 @@ int fixup_free_pvar_str_str(void** param, int param_no)
}
+int fixup_pvar_uint(void** param, int param_no)
+{
+ if (param_no == 1)
+ return fixup_pvar_all(param, param_no);
+ else if (param_no == 2)
+ return fixup_uint_uint(param, param_no);
+ return E_UNSPEC;
+}
+
+
+int fixup_free_pvar_uint(void** param, int param_no)
+{
+ if (param_no == 1)
+ return fixup_free_pvar_all(param, param_no);
+ return E_UNSPEC;
+}
+
FIXUP_F2FP(igp_null, 1, 1, 1, FPARAM_INT|FPARAM_PVS, 0)
FIXUP_F2FP(igp_igp, 1, 2, 2, FPARAM_INT|FPARAM_PVS, 0)
diff --git a/mod_fix.h b/mod_fix.h
index ec395b4..9c06bc5 100644
--- a/mod_fix.h
+++ b/mod_fix.h
@@ -105,6 +105,9 @@ int fixup_free_pvar_str(void** param, int param_no);
int fixup_pvar_str_str(void** param, int param_no);
int fixup_free_pvar_str_str(void** param, int param_no);
+int fixup_pvar_uint(void** param, int param_no);
+int fixup_free_pvar_uint(void** param, int param_no);
+
int fixup_igp_igp(void** param, int param_no);
int fixup_free_igp_igp(void** param, int param_no);
int fixup_igp_null(void** param, int param_no);