mirror of
https://github.com/chatmail/core.git
synced 2026-04-17 13:36:30 +03:00
fix(peerstate): equality checks are tricky
This commit is contained in:
@@ -18,7 +18,6 @@ use crate::x::*;
|
||||
* @class dc_apeerstate_t
|
||||
* Library-internal.
|
||||
*/
|
||||
#[repr(C)]
|
||||
pub struct dc_apeerstate_t<'a> {
|
||||
pub context: &'a dc_context_t,
|
||||
pub addr: *mut libc::c_char,
|
||||
@@ -214,7 +213,7 @@ pub unsafe fn dc_apeerstate_apply_header(
|
||||
peerstate.to_save |= 0x2i32
|
||||
}
|
||||
|
||||
if peerstate.public_key.as_ref() == Some(&header.public_key) {
|
||||
if peerstate.public_key.as_ref() != Some(&header.public_key) {
|
||||
peerstate.public_key = Some(header.public_key.clone());
|
||||
dc_apeerstate_recalc_fingerprint(peerstate);
|
||||
peerstate.to_save |= 0x2i32;
|
||||
|
||||
Reference in New Issue
Block a user