fix linux

This commit is contained in:
John Smith 2022-01-15 18:50:56 -05:00
parent 60c8cd7f03
commit dc9f71a683
4 changed files with 10 additions and 21 deletions

@ -1 +1 @@
Subproject commit 1295d708ec42542f076a13db69eadc448a94f985 Subproject commit 935ca957d7e223ef560a0b20b656730a325e0ba7

View File

@ -9,7 +9,7 @@ use libc::{
}; };
use rtnetlink::packet::{ use rtnetlink::packet::{
nlas::address::Nla, AddressMessage, AF_INET, AF_INET6, IFA_F_DADFAILED, IFA_F_DEPRECATED, nlas::address::Nla, AddressMessage, AF_INET, AF_INET6, IFA_F_DADFAILED, IFA_F_DEPRECATED,
IFA_F_PERMANENT, IFA_F_TEMPORARY, IFA_F_TENTATIVE, IFA_F_OPTIMISTIC, IFA_F_PERMANENT, IFA_F_TEMPORARY, IFA_F_TENTATIVE,
}; };
use rtnetlink::{new_connection_with_socket, sys::SmolSocket, Handle, IpVersion}; use rtnetlink::{new_connection_with_socket, sys::SmolSocket, Handle, IpVersion};
use std::convert::TryInto; use std::convert::TryInto;
@ -47,7 +47,9 @@ fn flags_to_address_flags(flags: u32) -> AddressFlags {
AddressFlags { AddressFlags {
is_temporary: (flags & IFA_F_TEMPORARY) != 0, is_temporary: (flags & IFA_F_TEMPORARY) != 0,
is_dynamic: (flags & IFA_F_PERMANENT) == 0, is_dynamic: (flags & IFA_F_PERMANENT) == 0,
is_preferred: (flags & (IFA_F_TENTATIVE | IFA_F_DADFAILED | IFA_F_DEPRECATED | IFA_F_OPTIMISTIC) ) == 0, is_preferred: (flags
& (IFA_F_TENTATIVE | IFA_F_DADFAILED | IFA_F_DEPRECATED | IFA_F_OPTIMISTIC))
== 0,
} }
} }

View File

@ -154,7 +154,7 @@ impl veilid_server::Server for VeilidServerImpl {
assert!(false, "write me!"); assert!(false, "write me!");
} }
else { else {
crate::unix::shutdown(); crate::server::shutdown();
} }
} }

View File

@ -1,21 +1,8 @@
use crate::client_api; use crate::settings::Settings;
use crate::client_log_channel::*; use clap::ArgMatches;
use crate::settings; // use log::*;
use async_std::channel::{bounded, Receiver, Sender};
use clap::{App, Arg};
use lazy_static::*;
use log::*;
use parking_lot::Mutex;
use simplelog::*;
use std::ffi::OsStr;
use std::fs::OpenOptions;
use std::path::Path;
use std::str::FromStr;
use std::sync::Arc;
use std::time::{Duration, Instant};
use veilid_core::xx::SingleShotEventual;
pub fn run_daemon(settings: Settings, matches: ArgMatches) -> Result<(), String> { pub fn run_daemon(_settings: Settings, _matches: ArgMatches) -> Result<(), String> {
eprintln!("Windows Service mode not implemented yet."); eprintln!("Windows Service mode not implemented yet.");
Ok(()) Ok(())
} }