mirror of
https://github.com/chatmail/core.git
synced 2026-05-08 09:26:29 +03:00
remove gotos in dc_e2ee in dcrypt_part function
This commit is contained in:
@@ -835,7 +835,7 @@ unsafe fn decrypt_part(
|
|||||||
ret_valid_signatures: &mut HashSet<String>,
|
ret_valid_signatures: &mut HashSet<String>,
|
||||||
ret_decrypted_mime: *mut *mut mailmime,
|
ret_decrypted_mime: *mut *mut mailmime,
|
||||||
) -> libc::c_int {
|
) -> libc::c_int {
|
||||||
let current_block: u64;
|
let ok_to_continue = true;
|
||||||
let mime_data: *mut mailmime_data;
|
let mime_data: *mut mailmime_data;
|
||||||
let mut mime_transfer_encoding: libc::c_int = MAILMIME_MECHANISM_BINARY as libc::c_int;
|
let mut mime_transfer_encoding: libc::c_int = MAILMIME_MECHANISM_BINARY as libc::c_int;
|
||||||
/* mmap_string_unref()'d if set */
|
/* mmap_string_unref()'d if set */
|
||||||
@@ -883,9 +883,7 @@ unsafe fn decrypt_part(
|
|||||||
decoded_data_bytes = (*mime_data).dt_data.dt_text.dt_length;
|
decoded_data_bytes = (*mime_data).dt_data.dt_text.dt_length;
|
||||||
if decoded_data.is_null() || decoded_data_bytes <= 0 {
|
if decoded_data.is_null() || decoded_data_bytes <= 0 {
|
||||||
/* no error - but no data */
|
/* no error - but no data */
|
||||||
current_block = 2554982661806928548;
|
ok_to_continue = false;
|
||||||
} else {
|
|
||||||
current_block = 4488286894823169796;
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
let r: libc::c_int;
|
let r: libc::c_int;
|
||||||
@@ -902,15 +900,12 @@ unsafe fn decrypt_part(
|
|||||||
|| transfer_decoding_buffer.is_null()
|
|| transfer_decoding_buffer.is_null()
|
||||||
|| decoded_data_bytes <= 0
|
|| decoded_data_bytes <= 0
|
||||||
{
|
{
|
||||||
current_block = 2554982661806928548;
|
ok_to_continue = false;
|
||||||
} else {
|
} else {
|
||||||
decoded_data = transfer_decoding_buffer;
|
decoded_data = transfer_decoding_buffer;
|
||||||
current_block = 4488286894823169796;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
match current_block {
|
if ok_to_continue {
|
||||||
2554982661806928548 => {}
|
|
||||||
_ => {
|
|
||||||
/* encrypted, decoded data in decoded_data now ... */
|
/* encrypted, decoded data in decoded_data now ... */
|
||||||
if !(0 == has_decrypted_pgp_armor(decoded_data, decoded_data_bytes as libc::c_int))
|
if !(0 == has_decrypted_pgp_armor(decoded_data, decoded_data_bytes as libc::c_int))
|
||||||
{
|
{
|
||||||
@@ -952,7 +947,6 @@ unsafe fn decrypt_part(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
//mailmime_substitute(mime, new_mime);
|
//mailmime_substitute(mime, new_mime);
|
||||||
//s. mailprivacy_gnupg.c::pgp_decrypt()
|
//s. mailprivacy_gnupg.c::pgp_decrypt()
|
||||||
if !transfer_decoding_buffer.is_null() {
|
if !transfer_decoding_buffer.is_null() {
|
||||||
|
|||||||
Reference in New Issue
Block a user