Skip to content

Commit

Permalink
acc: better evaluation of error return for pv_printf_s()
Browse files Browse the repository at this point in the history
(cherry picked from commit 69ccdc2)
(cherry picked from commit 9762779)
  • Loading branch information
miconda committed Jan 28, 2020
1 parent 8785c8f commit 1c6d370
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/modules/acc/acc_logic.c
Expand Up @@ -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, &param->reason)==-1) {
if(pv_printf_s(rq, param->elem, &param->reason)<0) {
LM_ERR("Can't get value for %.*s\n", param->reason.len, param->reason.s);
return -1;
}
Expand Down

0 comments on commit 1c6d370

Please sign in to comment.