Module: kamailio
Branch: master
Commit: ce745f3837a668b67506bfd404c7ef619936de7a
URL:
https://github.com/kamailio/kamailio/commit/ce745f3837a668b67506bfd404c7ef6…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2016-11-06T22:55:11+01:00
pv: return false if pv_unset() fails
---
Modified: modules/pv/pv.c
---
Diff:
https://github.com/kamailio/kamailio/commit/ce745f3837a668b67506bfd404c7ef6…
Patch:
https://github.com/kamailio/kamailio/commit/ce745f3837a668b67506bfd404c7ef6…
---
diff --git a/modules/pv/pv.c b/modules/pv/pv.c
index 3e33596..999e589 100644
--- a/modules/pv/pv.c
+++ b/modules/pv/pv.c
@@ -577,7 +577,7 @@ static int mod_init(void)
{
LM_ERR("failed to register RPC commands\n");
return -1;
- }
+ }
pv_init_sbranch();
return 0;
@@ -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;
}