|
@@ -40,9 +40,9 @@
|
|
|
|
|
|
MODULE_VERSION
|
|
|
|
|
|
-static str class_name = {.s = "Kamailio", .len = 10};
|
|
|
-static str child_init_mname = { .s = "child_init", .len = 0};
|
|
|
-static str java_options_str = { .s = "-Djava.compiler=NONE", .len = 21};
|
|
|
+static char* class_name = "Kamailio";
|
|
|
+static char* child_init_mname = "child_init";
|
|
|
+static char* java_options_str = "-Djava.compiler=NONE";
|
|
|
|
|
|
static int mod_init(void);
|
|
|
static int child_init(int rank);
|
|
@@ -51,9 +51,9 @@ static void mod_destroy(void);
|
|
|
|
|
|
/** module parameters */
|
|
|
static param_export_t params[] = {
|
|
|
- {"class_name", STR_PARAM, &class_name },
|
|
|
- {"child_init_method", STR_PARAM, &child_init_mname },
|
|
|
- {"java_options", STR_PARAM, &java_options_str },
|
|
|
+ {"class_name", PARAM_STRING, &class_name },
|
|
|
+ {"child_init_method", PARAM_STRING, &child_init_mname }, /* Unused parameter? */
|
|
|
+ {"java_options", PARAM_STRING, &java_options_str },
|
|
|
{"force_cmd_exec", INT_PARAM, &force_cmd_exec },
|
|
|
{0,0,0}
|
|
|
};
|
|
@@ -120,9 +120,9 @@ static int mod_init(void)
|
|
|
}
|
|
|
memset(options, 0, sizeof(JavaVMOption));
|
|
|
|
|
|
- LM_INFO("Initializing Java VM with options: %s\n", java_options_str.s);
|
|
|
+ LM_INFO("Initializing Java VM with options: %s\n", java_options_str);
|
|
|
|
|
|
- opts = split(java_options_str.s, " ");
|
|
|
+ opts = split(java_options_str, " ");
|
|
|
for (nOptions=0; opts[nOptions] != NULL; nOptions++)
|
|
|
{
|
|
|
options[nOptions].optionString = opts[nOptions];
|
|
@@ -151,7 +151,7 @@ static int mod_init(void)
|
|
|
return -1;
|
|
|
}
|
|
|
|
|
|
- KamailioClass = (*env)->FindClass(env, class_name.s);
|
|
|
+ KamailioClass = (*env)->FindClass(env, class_name);
|
|
|
if (!KamailioClass || (*env)->ExceptionCheck(env))
|
|
|
{
|
|
|
handle_exception();
|