Browse code

acc: better evaluation of error return for pv_printf_s()

(cherry picked from commit 69ccdc25fbfaf01785127ecb051429e51df6cad5)

Daniel-Constantin Mierla authored on 30/10/2019 17:27:40
Showing 1 changed files
... ...
@@ -178,7 +178,7 @@ int acc_parse_code(char *p, struct acc_param *param)
178 178
 int acc_get_param_value(struct sip_msg *rq, struct acc_param *param)
179 179
 {
180 180
 	if(param->elem!=NULL) {
181
-		if(pv_printf_s(rq, param->elem, &param->reason)==-1) {
181
+		if(pv_printf_s(rq, param->elem, &param->reason)<0) {
182 182
 			LM_ERR("Can't get value for %.*s\n", param->reason.len, param->reason.s);
183 183
 			return -1;
184 184
 		}