mirror of
https://github.com/chatmail/core.git
synced 2026-05-06 06:46:35 +03:00
Change type of dc_mimeparser_t.decryption_failed to bool
This commit is contained in:
@@ -52,7 +52,7 @@ pub struct dc_mimeparser_t<'a> {
|
|||||||
pub header_protected: *mut mailimf_fields,
|
pub header_protected: *mut mailimf_fields,
|
||||||
pub subject: *mut libc::c_char,
|
pub subject: *mut libc::c_char,
|
||||||
pub is_send_by_messenger: bool,
|
pub is_send_by_messenger: bool,
|
||||||
pub decrypting_failed: libc::c_int,
|
pub decrypting_failed: bool,
|
||||||
pub e2ee_helper: E2eeHelper,
|
pub e2ee_helper: E2eeHelper,
|
||||||
pub is_forwarded: bool,
|
pub is_forwarded: bool,
|
||||||
pub context: &'a Context,
|
pub context: &'a Context,
|
||||||
@@ -71,7 +71,7 @@ pub fn dc_mimeparser_new(context: &Context) -> dc_mimeparser_t {
|
|||||||
header_protected: std::ptr::null_mut(),
|
header_protected: std::ptr::null_mut(),
|
||||||
subject: std::ptr::null_mut(),
|
subject: std::ptr::null_mut(),
|
||||||
is_send_by_messenger: false,
|
is_send_by_messenger: false,
|
||||||
decrypting_failed: 0,
|
decrypting_failed: false,
|
||||||
e2ee_helper: Default::default(),
|
e2ee_helper: Default::default(),
|
||||||
is_forwarded: false,
|
is_forwarded: false,
|
||||||
context,
|
context,
|
||||||
@@ -107,7 +107,7 @@ unsafe fn dc_mimeparser_empty(mimeparser: &mut dc_mimeparser_t) {
|
|||||||
}
|
}
|
||||||
mimeparser.is_forwarded = false;
|
mimeparser.is_forwarded = false;
|
||||||
mimeparser.reports.clear();
|
mimeparser.reports.clear();
|
||||||
mimeparser.decrypting_failed = 0i32;
|
mimeparser.decrypting_failed = false;
|
||||||
mimeparser.e2ee_helper.thanks();
|
mimeparser.e2ee_helper.thanks();
|
||||||
|
|
||||||
mimeparser.location_kml = None;
|
mimeparser.location_kml = None;
|
||||||
@@ -233,7 +233,7 @@ pub unsafe fn dc_mimeparser_parse<'a>(context: &'a Context, body: &[u8]) -> dc_m
|
|||||||
}
|
}
|
||||||
if !mimeparser.subject.is_null() {
|
if !mimeparser.subject.is_null() {
|
||||||
let mut prepend_subject: libc::c_int = 1i32;
|
let mut prepend_subject: libc::c_int = 1i32;
|
||||||
if 0 == mimeparser.decrypting_failed {
|
if !mimeparser.decrypting_failed {
|
||||||
let p: *mut libc::c_char = strchr(mimeparser.subject, ':' as i32);
|
let p: *mut libc::c_char = strchr(mimeparser.subject, ':' as i32);
|
||||||
if p.wrapping_offset_from(mimeparser.subject) == 2
|
if p.wrapping_offset_from(mimeparser.subject) == 2
|
||||||
|| p.wrapping_offset_from(mimeparser.subject) == 3
|
|| p.wrapping_offset_from(mimeparser.subject) == 3
|
||||||
@@ -301,7 +301,7 @@ pub unsafe fn dc_mimeparser_parse<'a>(context: &'a Context, body: &[u8]) -> dc_m
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if 0 == mimeparser.decrypting_failed {
|
if !mimeparser.decrypting_failed {
|
||||||
let dn_field: *const mailimf_optional_field = dc_mimeparser_lookup_optional_field(
|
let dn_field: *const mailimf_optional_field = dc_mimeparser_lookup_optional_field(
|
||||||
&mimeparser,
|
&mimeparser,
|
||||||
"Chat-Disposition-Notification-To",
|
"Chat-Disposition-Notification-To",
|
||||||
@@ -597,7 +597,7 @@ unsafe fn dc_mimeparser_parse_mime_recursive(
|
|||||||
|
|
||||||
mimeparser.parts.push(part);
|
mimeparser.parts.push(part);
|
||||||
any_part_added = 1i32;
|
any_part_added = 1i32;
|
||||||
mimeparser.decrypting_failed = 1i32
|
mimeparser.decrypting_failed = true;
|
||||||
}
|
}
|
||||||
46 => {
|
46 => {
|
||||||
cur = (*(*mime).mm_data.mm_multipart.mm_mp_list).first;
|
cur = (*(*mime).mm_data.mm_multipart.mm_mp_list).first;
|
||||||
|
|||||||
Reference in New Issue
Block a user