replace unsafe use of dc logging with info! macro as per advise from @flub

This commit is contained in:
holger krekel
2019-07-01 18:57:37 +02:00
parent 06e16c81f9
commit 384822b5eb
2 changed files with 21 additions and 9 deletions

View File

@@ -10,6 +10,7 @@ use crate::dc_log::*;
use crate::dc_loginparam::*;
use crate::dc_tools::*;
use crate::oauth2::*;
use crate::types::*;
pub struct Smtp {
transport: Option<lettre::smtp::SmtpTransport>,
@@ -48,15 +49,7 @@ impl Smtp {
/// Connect using the provided login params
pub fn connect(&mut self, context: &Context, lp: *const dc_loginparam_t) -> usize {
warn!(context, 0, "SMTP ***************** CONNECT");
unsafe {
dc_log_event(
context,
Event::INFO,
0,
b"SMTP ***************************************************** connect starts" as *const u8 as *const libc::c_char,
);
}
info!(context, 0, "SMTP ***************** CONNECT");
if lp.is_null() {
return 0;