Browse code

dialog: updated ki_dlg_var_is_null() to use safer api function

Daniel-Constantin Mierla authored on 26/09/2022 10:51:50
Showing 1 changed files
... ...
@@ -2518,14 +2518,14 @@ static int ki_dlg_var_rm(sip_msg_t *msg, str *name)
2518 2518
 static int ki_dlg_var_is_null(sip_msg_t *msg, str *name)
2519 2519
 {
2520 2520
 	dlg_cell_t *dlg;
2521
-	str *pval;
2521
+	int ret;
2522 2522
 
2523 2523
 	dlg = dlg_get_msg_dialog(msg);
2524 2524
 	if(dlg==NULL) {
2525 2525
 		return 1;
2526 2526
 	}
2527
-	pval = get_dlg_varref(dlg, name);
2528
-	if(pval==NULL || pval->s==NULL) {
2527
+	ret = get_dlg_varstatus(dlg, name);
2528
+	if(ret==1) {
2529 2529
 		return 1;
2530 2530
 	}
2531 2531
 	return -1;