modified: src/simple_log.rs
Some checks failed
gitea/Frida-android-native/pipeline/head There was a failure building this commit

This commit is contained in:
Michael Wain 2024-10-07 02:15:28 +03:00
parent d73fbe6189
commit 02212266a4

View File

@ -4,14 +4,14 @@ use crossbeam_channel::{ Sender, Receiver };
static bnd: (Sender<Vec<u8>>, Receiver<Vec<u8>>) = unbounded::<Vec<u8>>(); static bnd: (Sender<Vec<u8>>, Receiver<Vec<u8>>) = unbounded::<Vec<u8>>();
pub fn fetch_logs() -> Vec<u8> { pub fn fetch_logs() -> Vec<u8> {
if let Ok(bytes) = rx.recv() { if let Ok(bytes) = bnd.1.recv() {
return bytes; return bytes;
} }
Vec::new() Vec::new()
} }
pub fn push_log(data: Vec<u8>) { pub fn push_log(data: Vec<u8>) {
tx.send(data); bnd.0.send(data);
} }
#[derive(Debug, Clone, PartialEq, Eq, Default)] #[derive(Debug, Clone, PartialEq, Eq, Default)]