Module: kamailio
Branch: master
Commit: 69ccdc25fbfaf01785127ecb051429e51df6cad5
URL:
https://github.com/kamailio/kamailio/commit/69ccdc25fbfaf01785127ecb051429e…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2019-10-30T18:28:18+01:00
acc: better evaluation of error return for pv_printf_s()
---
Modified: src/modules/acc/acc_logic.c
---
Diff:
https://github.com/kamailio/kamailio/commit/69ccdc25fbfaf01785127ecb051429e…
Patch:
https://github.com/kamailio/kamailio/commit/69ccdc25fbfaf01785127ecb051429e…
---
diff --git a/src/modules/acc/acc_logic.c b/src/modules/acc/acc_logic.c
index cc66bc67df..4ccf75e653 100644
--- a/src/modules/acc/acc_logic.c
+++ b/src/modules/acc/acc_logic.c
@@ -178,7 +178,7 @@ int acc_parse_code(char *p, struct acc_param *param)
int acc_get_param_value(struct sip_msg *rq, struct acc_param *param)
{
if(param->elem!=NULL) {
- if(pv_printf_s(rq, param->elem, ¶m->reason)==-1) {
+ if(pv_printf_s(rq, param->elem, ¶m->reason)<0) {
LM_ERR("Can't get value for %.*s\n", param->reason.len,
param->reason.s);
return -1;
}