Module: sip-router
Branch: master
Commit: 2895dbdc0ba7c86b855fdffce178e3ca072a631a
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=2895dbd…
Author: Elena-Ramona Modroiu <ramona(a)asipto.com>
Committer: Elena-Ramona Modroiu <ramona(a)asipto.com>
Date: Wed Sep 26 12:09:10 2012 +0200
core/fixups: updates to reflect usage of pv cache for pv_elem_t
---
mod_fix.c | 3 ++-
sr_module.c | 4 ++--
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/mod_fix.c b/mod_fix.c
index 0f66437..9064442 100644
--- a/mod_fix.c
+++ b/mod_fix.c
@@ -484,7 +484,8 @@ int fixup_free_igp_pvar_pvar(void** param, int param_no)
return E_UNSPEC; \
} else{ \
fp=(fparam_t*)*param; \
- if ((ret==0) && (fp->v.pve->spec.getf==0)){ \
+ if ((ret==0) && (fp->v.pve->spec==0 \
+ || fp->v.pve->spec->getf==0)){ \
fparam_free_restore(param); \
return fix_param_types(FPARAM_STR, param); \
} else if (ret==1) \
diff --git a/sr_module.c b/sr_module.c
index 172b400..485f975 100644
--- a/sr_module.c
+++ b/sr_module.c
@@ -1410,7 +1410,7 @@ int fixup_var_pve_12(void** param, int param_no)
If the resulting PVE is static (normal string), discard
it and use the normal string fixup (faster at runtime) */
fp = (fparam_t*)*param;
- if (fp->v.pve->spec.getf == 0)
+ if (fp->v.pve->spec == 0 || fp->v.pve->spec->getf == 0)
fparam_free_restore(param); /* fallback to STR below */
else
return ret; /* dynamic PVE => return */
@@ -1452,7 +1452,7 @@ int fixup_var_pve_str_12(void** param, int param_no)
If the resulting PVE is static (normal string), discard
it and use the normal string fixup (faster at runtime) */
fp = (fparam_t*)*param;
- if (fp->v.pve->spec.getf == 0)
+ if (fp->v.pve->spec == 0 || fp->v.pve->spec->getf == 0)
fparam_free_restore(param); /* fallback to STR below */
else
return ret; /* dynamic PVE => return */