diff --git a/examples/repl/cmdline.rs b/examples/repl/cmdline.rs index f8e42a0e7..bef6fc304 100644 --- a/examples/repl/cmdline.rs +++ b/examples/repl/cmdline.rs @@ -342,12 +342,6 @@ unsafe fn log_contactlist(context: &Context, contacts: &Vec) { } } -static mut S_IS_AUTH: libc::c_int = 0; - -pub unsafe fn dc_cmdline_skip_auth() { - S_IS_AUTH = 1; -} - fn chat_prefix(chat: &Chat) -> &'static str { chat.typ.into() } @@ -461,20 +455,6 @@ pub unsafe fn dc_cmdline(context: &Context, line: &str) -> Result<(), failure::E =============================================" ), }, - "auth" => { - if 0 == S_IS_AUTH { - let is_pw = context - .get_config(config::Config::MailPw) - .unwrap_or_default(); - if arg1 == is_pw { - S_IS_AUTH = 1; - } else { - println!("Bad password."); - } - } else { - println!("Already authorized."); - } - } "open" => { ensure!(!arg1.is_empty(), "Argument missing"); dc_close(context); diff --git a/examples/repl/main.rs b/examples/repl/main.rs index 8a0ff4497..616386ff9 100644 --- a/examples/repl/main.rs +++ b/examples/repl/main.rs @@ -389,8 +389,6 @@ impl Helper for DcHelper {} fn main_0(args: Vec) -> Result<(), failure::Error> { let mut context = dc_context_new(Some(receive_event), ptr::null_mut(), Some("CLI".into())); - unsafe { dc_cmdline_skip_auth() }; - if args.len() == 2 { if unsafe { !dc_open(&mut context, &args[1], None) } { println!("Error: Cannot open {}.", args[0],);