carefully replace msg state and type numbers with DC_MSG_* and DC_STATE_* constants and also declare them as i32 to avoid tons of casts

This commit is contained in:
holger krekel
2019-07-23 23:58:23 +02:00
parent 5de7c35622
commit 9d87f2f10b
9 changed files with 147 additions and 145 deletions

View File

@@ -2,7 +2,7 @@ use mmime::mailimf_types::*;
use percent_encoding::{utf8_percent_encode, DEFAULT_ENCODE_SET};
use crate::aheader::EncryptPreference;
use crate::constants::Event;
use crate::constants::*;
use crate::context::Context;
use crate::dc_array::*;
use crate::dc_chat::*;
@@ -261,7 +261,7 @@ unsafe fn send_handshake_msg(
grpid: *const libc::c_char,
) {
let mut msg: *mut dc_msg_t = dc_msg_new_untyped(context);
(*msg).type_0 = 10i32;
(*msg).type_0 = DC_MSG_TEXT;
(*msg).text = dc_mprintf(
b"Secure-Join: %s\x00" as *const u8 as *const libc::c_char,
step,