]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
FS-7256 : Unable to load mod_java.
authorVineet Chaudhary <code.vineet@gmail.com>
Tue, 10 Feb 2015 07:13:26 +0000 (12:43 +0530)
committerVineet Chaudhary <code.vineet@gmail.com>
Tue, 10 Feb 2015 07:13:26 +0000 (12:43 +0530)
FS not able to load mod_java because in load_config switch_status_t status
is not initialised and in some conditions status is not gets set ever
resulting returning garbage value, resulting failuar to load mod_java.so.

With this patch status is set to SWITCH_STATUS_SUCCESS so in case everything
is loaded it can load mod_java else status is set to SWITCH_STATUS_FALSE(which
is already covered).

src/mod/languages/mod_java/modjava.c

index 663d9a0a9ffa672d4a6b45d3969171393504bda9..17b72d582681a1ced5cd0abc6a1b1f7b4992152e 100644 (file)
@@ -187,7 +187,7 @@ SWITCH_STANDARD_APP(java_function)
 static switch_status_t load_config(JavaVMOption **javaOptions, int *optionCount, vm_control_t * vmControl)
 {
     switch_xml_t cfg, xml;
-    switch_status_t status;
+    switch_status_t status = SWITCH_STATUS_SUCCESS;
        char *derr = NULL;
 
     xml = switch_xml_open_cfg("java.conf", &cfg, NULL);