Browse code

dialog: updated ki_dlg_var_is_null() to use safer api function

(cherry picked from commit abdb02d3d2eec9fb45646f68996da3526c92ef58)

Daniel-Constantin Mierla authored on 26/09/2022 10:51:50
Showing 1 changed files
... ...
@@ -2030,14 +2030,14 @@ static int ki_dlg_var_rm(sip_msg_t *msg, str *name)
2030 2030
 static int ki_dlg_var_is_null(sip_msg_t *msg, str *name)
2031 2031
 {
2032 2032
 	dlg_cell_t *dlg;
2033
-	str *pval;
2033
+	int ret;
2034 2034
 
2035 2035
 	dlg = dlg_get_msg_dialog(msg);
2036 2036
 	if(dlg==NULL) {
2037 2037
 		return 1;
2038 2038
 	}
2039
-	pval = get_dlg_varref(dlg, name);
2040
-	if(pval==NULL || pval->s==NULL) {
2039
+	ret = get_dlg_varstatus(dlg, name);
2040
+	if(ret==1) {
2041 2041
 		return 1;
2042 2042
 	}
2043 2043
 	return -1;