Browse code

acc_json: proper check if the mqueue name is set and the module can be loaded

Daniel-Constantin Mierla authored on 07/01/2019 14:34:42
Showing 1 changed files
... ...
@@ -115,7 +115,8 @@ static int mod_init(void)
115 115
 	if(output_mqueue_str && (load_mq_api(&mq_api) != 0)) {
116 116
 		LM_ERR("can't load mqueue module API, disabling json acc to mqueue\n");
117 117
 		output_mqueue_str = NULL;
118
-	} else {
118
+	}
119
+	if(output_mqueue_str) {
119 120
 		q_name.s = output_mqueue_str;
120 121
 		q_name.len = strlen(output_mqueue_str);
121 122
 	}