other cast as per @dignifiedquire comment -- also convert some logging along the way

This commit is contained in:
holger krekel
2019-07-10 11:54:29 +02:00
parent 6d17de05b2
commit b810b5a8f8
2 changed files with 7 additions and 18 deletions

View File

@@ -591,7 +591,8 @@ pub unsafe fn dc_receive_imf(
b"rfc724_mid\x00" as *const u8 as *const libc::c_char,
rfc724_mid,
);
created_db_entries.push((chat_id as i32, insert_msg_id as i32))
created_db_entries
.push((chat_id as usize, insert_msg_id as usize))
}
}
i = i.wrapping_add(1)
@@ -865,7 +866,7 @@ pub unsafe fn dc_receive_imf(
dc_job_add(
context,
DC_JOB_DELETE_MSG_ON_IMAP,
created_db_entries[0].1,
created_db_entries[0].1 as i32,
0 as *const libc::c_char,
0,
);
@@ -882,7 +883,7 @@ pub unsafe fn dc_receive_imf(
if let Some(create_event_to_send) = create_event_to_send {
for entry in &created_db_entries {
let (msg_id, insert_id) = entry;
context.call_cb(create_event_to_send, *msg_id as usize, *insert_id as usize);
context.call_cb(create_event_to_send, *msg_id, *insert_id);
}
}
for ev in &rr_event_to_send {

View File

@@ -437,25 +437,13 @@ pub unsafe fn dc_handle_securejoin_handshake(
let invitenumber: *const libc::c_char;
invitenumber = lookup_field(mimeparser, "Secure-Join-Invitenumber");
if invitenumber.is_null() {
warn!(
context,
0,
"Secure-join denied (invitenumber missing).",
);
warn!(context, 0, "Secure-join denied (invitenumber missing).",);
current_block = 4378276786830486580;
} else if dc_token_exists(context, DC_TOKEN_INVITENUMBER, invitenumber) == 0i32 {
warn!(
context,
0,
"Secure-join denied (bad invitenumber).",
);
warn!(context, 0, "Secure-join denied (bad invitenumber).",);
current_block = 4378276786830486580;
} else {
info!(
context,
0,
"Secure-join requested.",
);
info!(context, 0, "Secure-join requested.",);
context.call_cb(
Event::SECUREJOIN_INVITER_PROGRESS,
contact_id as uintptr_t,