mirror of
https://github.com/chatmail/core.git
synced 2026-05-15 12:56:30 +03:00
cargo fmt
This commit is contained in:
committed by
holger krekel
parent
5b993f601f
commit
1d09d2f0d1
@@ -754,65 +754,59 @@ pub unsafe fn dc_handle_securejoin_handshake(
|
|||||||
ok_to_continue = true;
|
ok_to_continue = true;
|
||||||
}
|
}
|
||||||
if ok_to_continue {
|
if ok_to_continue {
|
||||||
if 0 == mark_peer_as_verified(
|
if 0 == mark_peer_as_verified(context, &scanned_fingerprint_of_alice) {
|
||||||
|
could_not_establish_secure_connection(
|
||||||
context,
|
context,
|
||||||
&scanned_fingerprint_of_alice,
|
contact_chat_id,
|
||||||
) {
|
b"Fingerprint mismatch on joiner-side.\x00" as *const u8
|
||||||
could_not_establish_secure_connection(
|
as *const libc::c_char,
|
||||||
|
);
|
||||||
|
ok_to_continue = false;
|
||||||
|
} else {
|
||||||
|
Contact::scaleup_origin_by_id(
|
||||||
|
context,
|
||||||
|
contact_id,
|
||||||
|
Origin::SecurejoinJoined,
|
||||||
|
);
|
||||||
|
context.call_cb(
|
||||||
|
Event::CONTACTS_CHANGED,
|
||||||
|
0i32 as uintptr_t,
|
||||||
|
0i32 as uintptr_t,
|
||||||
|
);
|
||||||
|
if 0 != join_vg {
|
||||||
|
if !addr_equals_self(
|
||||||
context,
|
context,
|
||||||
contact_chat_id,
|
as_str(lookup_field(mimeparser, "Chat-Group-Member-Added")),
|
||||||
b"Fingerprint mismatch on joiner-side.\x00" as *const u8
|
) {
|
||||||
as *const libc::c_char,
|
info!(
|
||||||
);
|
|
||||||
ok_to_continue = false;
|
|
||||||
} else {
|
|
||||||
Contact::scaleup_origin_by_id(
|
|
||||||
context,
|
|
||||||
contact_id,
|
|
||||||
Origin::SecurejoinJoined,
|
|
||||||
);
|
|
||||||
context.call_cb(
|
|
||||||
Event::CONTACTS_CHANGED,
|
|
||||||
0i32 as uintptr_t,
|
|
||||||
0i32 as uintptr_t,
|
|
||||||
);
|
|
||||||
if 0 != join_vg {
|
|
||||||
if !addr_equals_self(
|
|
||||||
context,
|
|
||||||
as_str(lookup_field(
|
|
||||||
mimeparser,
|
|
||||||
"Chat-Group-Member-Added",
|
|
||||||
)),
|
|
||||||
) {
|
|
||||||
info!(
|
|
||||||
context,
|
context,
|
||||||
0,
|
0,
|
||||||
"Message belongs to a different handshake (scaled up contact anyway to allow creation of group)."
|
"Message belongs to a different handshake (scaled up contact anyway to allow creation of group)."
|
||||||
);
|
);
|
||||||
ok_to_continue = false;
|
ok_to_continue = false;
|
||||||
} else {
|
|
||||||
ok_to_continue = true;
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
ok_to_continue = true;
|
ok_to_continue = true;
|
||||||
}
|
}
|
||||||
if ok_to_continue {
|
} else {
|
||||||
secure_connection_established(context, contact_chat_id);
|
ok_to_continue = true;
|
||||||
context.bob.write().unwrap().expects = 0;
|
}
|
||||||
if 0 != join_vg {
|
if ok_to_continue {
|
||||||
send_handshake_msg(
|
secure_connection_established(context, contact_chat_id);
|
||||||
context,
|
context.bob.write().unwrap().expects = 0;
|
||||||
contact_chat_id,
|
if 0 != join_vg {
|
||||||
b"vg-member-added-received\x00" as *const u8
|
send_handshake_msg(
|
||||||
as *const libc::c_char,
|
context,
|
||||||
"",
|
contact_chat_id,
|
||||||
ptr::null(),
|
b"vg-member-added-received\x00" as *const u8
|
||||||
"",
|
as *const libc::c_char,
|
||||||
);
|
"",
|
||||||
}
|
ptr::null(),
|
||||||
end_bobs_joining(context, 1i32);
|
"",
|
||||||
ok_to_continue = true;
|
);
|
||||||
}
|
}
|
||||||
|
end_bobs_joining(context, 1i32);
|
||||||
|
ok_to_continue = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -851,9 +845,9 @@ pub unsafe fn dc_handle_securejoin_handshake(
|
|||||||
ok_to_continue = true;
|
ok_to_continue = true;
|
||||||
}
|
}
|
||||||
if ok_to_continue {
|
if ok_to_continue {
|
||||||
if 0 != ret & 0x2i32 {
|
if 0 != ret & 0x2i32 {
|
||||||
ret |= 0x4i32
|
ret |= 0x4i32
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user