mirror of
https://github.com/chatmail/core.git
synced 2026-05-12 03:16:29 +03:00
Accessible msg error and type changes
This commit is contained in:
@@ -2962,6 +2962,19 @@ pub unsafe extern "C" fn dc_msg_latefiling_mediasize(
|
||||
});
|
||||
}
|
||||
|
||||
#[no_mangle]
|
||||
pub unsafe extern "C" fn dc_msg_get_error(msg: *mut dc_msg_t) -> *mut libc::c_char {
|
||||
if msg.is_null() {
|
||||
eprintln!("ignoring careless call to dc_msg_get_error()");
|
||||
return ptr::null_mut();
|
||||
}
|
||||
let ffi_msg = &*msg;
|
||||
match ffi_msg.message.error() {
|
||||
Some(error) => error.strdup(),
|
||||
None => ptr::null_mut(),
|
||||
}
|
||||
}
|
||||
|
||||
// dc_contact_t
|
||||
|
||||
/// FFI struct for [dc_contact_t]
|
||||
|
||||
Reference in New Issue
Block a user