Skip to content

Commit

Permalink
pv: return false if pv_unset() fails
Browse files Browse the repository at this point in the history
  • Loading branch information
miconda committed Nov 6, 2016
1 parent de65e91 commit ce745f3
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions modules/pv/pv.c
Expand Up @@ -577,7 +577,7 @@ static int mod_init(void)
{
LM_ERR("failed to register RPC commands\n");
return -1;
}
}
pv_init_sbranch();

return 0;
Expand Down Expand Up @@ -620,7 +620,10 @@ static int pv_unset(struct sip_msg* msg, char* pvid, char *foo)
pv_spec_t *sp;

sp = (pv_spec_t*)pvid;
pv_set_spec_value(msg, sp, 0, NULL);
if(pv_set_spec_value(msg, sp, 0, NULL)<0) {
LM_ERR("faile to unset variable\n");
return -1;
}

return 1;
}
Expand Down

0 comments on commit ce745f3

Please sign in to comment.