android: Fix launch args.
Some checks failed
Build Tilde Friends / Build-All (push) Has been cancelled
Some checks failed
Build Tilde Friends / Build-All (push) Has been cancelled
This commit is contained in:
parent
c794c1b885
commit
afc7c64ed8
11
src/main.c
11
src/main.c
@ -1728,18 +1728,15 @@ static jint _tf_server_main(JNIEnv* env, jobject this_object, jstring files_dir,
|
|||||||
tf_printf("uv_chdir: %s\n", uv_strerror(result));
|
tf_printf("uv_chdir: %s\n", uv_strerror(result));
|
||||||
}
|
}
|
||||||
|
|
||||||
size_t port_file_arg_length = strlen(out_port_file) + strlen("out_http_port_file=") + 1;
|
size_t args_length = strlen(out_port_file) + strlen("--args=http_port=0,out_http_port_file=") + 1;
|
||||||
char* port_file_arg = alloca(port_file_arg_length);
|
char* args_buffer = alloca(args_length);
|
||||||
snprintf(port_file_arg, port_file_arg_length, "out_http_port_file=%s", out_port_file);
|
snprintf(args_buffer, args_length, "--args=http_port=0,out_http_port_file=%s", out_port_file);
|
||||||
|
|
||||||
const char* args[] = {
|
const char* args[] = {
|
||||||
"run",
|
"run",
|
||||||
"-z",
|
"-z",
|
||||||
apk,
|
apk,
|
||||||
"-a",
|
args_buffer,
|
||||||
port_file_arg,
|
|
||||||
"-p",
|
|
||||||
"0",
|
|
||||||
};
|
};
|
||||||
|
|
||||||
tf_task_set_android_service_callbacks(_tf_service_start, _tf_service_stop);
|
tf_task_set_android_service_callbacks(_tf_service_start, _tf_service_stop);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user