Explorar el Código

core/fixups: updates to reflect usage of pv cache for pv_elem_t

Elena-Ramona Modroiu hace 13 años
padre
commit
2895dbdc0b
Se han modificado 2 ficheros con 4 adiciones y 3 borrados
  1. 2 1
      mod_fix.c
  2. 2 2
      sr_module.c

+ 2 - 1
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) \

+ 2 - 2
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 */