Added pv_spec_free_contents() that behaves like pv_spec_free(),
but frees only the contents of the pv_spec and not the pv_spec
itself (good for cleaning up pv_specs that are part of other
structures).
+
+
+/** frees only the contests of a pv_spec_t. */
+void pv_spec_free_contents(pv_spec_t *spec)
+{
+ /* TODO: free name if it is PV */
+ if(spec->trans)
+ tr_free((trans_t*)spec->trans);
+}
+
+
+
/**
*
*/
void pv_spec_free(pv_spec_t *spec)
{
if(spec==0) return;
/**
*
*/
void pv_spec_free(pv_spec_t *spec)
{
if(spec==0) return;
- /* TODO: free name if it is PV */
- if(spec->trans)
- tr_free((trans_t*)spec->trans);
+ pv_spec_free_contents(spec);
int pv_elem_free_all(pv_elem_p log);
void pv_value_destroy(pv_value_t *val);
void pv_spec_free(pv_spec_t *spec);
int pv_elem_free_all(pv_elem_p log);
void pv_value_destroy(pv_value_t *val);
void pv_spec_free(pv_spec_t *spec);
+void pv_spec_free_contents(pv_spec_t* spec);
int pv_spec_dbg(pv_spec_p sp);
int pv_get_spec_index(struct sip_msg* msg, pv_param_p ip, int *idx, int *flags);
int pv_get_avp_name(struct sip_msg* msg, pv_param_p ip, int_str *avp_name,
int pv_spec_dbg(pv_spec_p sp);
int pv_get_spec_index(struct sip_msg* msg, pv_param_p ip, int *idx, int *flags);
int pv_get_avp_name(struct sip_msg* msg, pv_param_p ip, int_str *avp_name,