From dca7bb8e8512d61f03ef75b6eabfc70e95a69bf1 Mon Sep 17 00:00:00 2001 From: Adam Ierymenko Date: Wed, 21 Sep 2022 16:58:06 -0400 Subject: [PATCH] WIP it good --- controller/src/controller.rs | 26 +++++++++++++------------- service/src/datadir.rs | 13 +++++++------ 2 files changed, 20 insertions(+), 19 deletions(-) diff --git a/controller/src/controller.rs b/controller/src/controller.rs index 341260982..5cc453834 100644 --- a/controller/src/controller.rs +++ b/controller/src/controller.rs @@ -109,25 +109,25 @@ impl InnerProtocol for Controller { fn handle_error( &self, - source: &Arc>, - source_path: &Arc>, - in_re_verb: u8, - in_re_message_id: u64, - error_code: u8, - payload: &PacketBuffer, - cursor: &mut usize, + _source: &Arc>, + _source_path: &Arc>, + _in_re_verb: u8, + _in_re_message_id: u64, + _error_code: u8, + _payload: &PacketBuffer, + _cursor: &mut usize, ) -> PacketHandlerResult { PacketHandlerResult::NotHandled } fn handle_ok( &self, - source: &Arc>, - source_path: &Arc>, - in_re_verb: u8, - in_re_message_id: u64, - payload: &PacketBuffer, - cursor: &mut usize, + _source: &Arc>, + _source_path: &Arc>, + _in_re_verb: u8, + _in_re_message_id: u64, + _payload: &PacketBuffer, + _cursor: &mut usize, ) -> PacketHandlerResult { PacketHandlerResult::NotHandled } diff --git a/service/src/datadir.rs b/service/src/datadir.rs index bb12b3cd0..d7aaac782 100644 --- a/service/src/datadir.rs +++ b/service/src/datadir.rs @@ -1,11 +1,10 @@ // (c) 2020-2022 ZeroTier, Inc. -- currently propritery pending actual release and licensing. See LICENSE.md. -use std::path::{Path, PathBuf}; -use std::str::FromStr; -use std::sync::Arc; - use crate::localconfig::Config; use crate::utils::{read_limit, DEFAULT_FILE_IO_READ_LIMIT}; +use std::path::{Path, PathBuf}; +use std::str::FromStr; +use std::sync::Arc; use parking_lot::{Mutex, RwLock}; @@ -46,7 +45,8 @@ impl NodeStorage for DataDir { } fn save_node_identity(&self, id: &Identity) { - tokio::runtime::Handle::current().block_on(async { + /* + tokio::runtime::Handle::current().spawn(async move { assert!(id.secret.is_some()); let id_secret_str = id.to_secret_string(); let id_public_str = id.to_string(); @@ -55,7 +55,8 @@ impl NodeStorage for DataDir { let _ = tokio::fs::write(&secret_path, id_secret_str.as_bytes()).await; assert!(crate::utils::fs_restrict_permissions(&secret_path)); let _ = tokio::fs::write(self.base_path.join(IDENTITY_PUBLIC_FILENAME), id_public_str.as_bytes()).await; - }) + }); + */ } }