modified: src/lib.rs

This commit is contained in:
Michael Wain 2024-09-20 01:47:06 +03:00
parent 01066255fc
commit 9ee13db268

View File

@ -31,7 +31,7 @@ pub mod android {
use self::jni::sys::{jstring};
#[no_mangle]
pub unsafe extern fn Java_com_alterdekim_frida_FridaVPN_startClient(env: JNIEnv, _: JClass, java_pattern: JString) -> jstring {
pub unsafe extern fn Java_com_alterdekim_frida_FridaVPN_startClient(env: JNIEnv, _: JClass, java_pattern: JString) {
// Our Java companion code might pass-in "world" as a string, hence the name.
//let world = rust_greeting(env.get_string(java_pattern).expect("invalid pattern string").as_ptr());
// Retake pointer so that we can use it below and allow memory to be freed when it goes out of scope.
@ -49,8 +49,8 @@ pub mod android {
let config: ClientConfiguration = serde_yaml::from_str(cfg_raw).expect("Bad client config file structure");
client::client_mode(config);
let output = env.new_string("gabber").expect("Couldn't create java string!");
//let output = env.new_string("gabber").expect("Couldn't create java string!");
output.into_inner()
//output.into_inner()
}
}