Module: kamailio
Branch: 5.2
Commit: 97627793db2963704202f252d45821d8c05acc1b
URL:
https://github.com/kamailio/kamailio/commit/97627793db2963704202f252d45821d…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Henning Westerholt <hw(a)skalatan.de>
Date: 2020-01-23T15:53:22+01:00
acc: better evaluation of error return for pv_printf_s()
(cherry picked from commit 69ccdc25fbfaf01785127ecb051429e51df6cad5)
---
Modified: src/modules/acc/acc_logic.c
---
Diff:
https://github.com/kamailio/kamailio/commit/97627793db2963704202f252d45821d…
Patch:
https://github.com/kamailio/kamailio/commit/97627793db2963704202f252d45821d…
---
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;
}