mirror of
https://github.com/chatmail/core.git
synced 2026-04-26 18:06:35 +03:00
fix: regressions in dc_msg_get_duration() and dc_delete_contact() (#73)
* fix: regression in dc_msg_get_duration, should return int * fix: regression in dc_delete_contact()
This commit is contained in:
@@ -903,12 +903,12 @@ pub unsafe fn dc_msg_get_height(msg: *const dc_msg_t) -> libc::c_int {
|
||||
dc_param_get_int((*msg).param, 'h' as i32, 0i32)
|
||||
}
|
||||
|
||||
pub unsafe fn dc_msg_get_duration(msg: *const dc_msg_t) -> bool {
|
||||
pub unsafe fn dc_msg_get_duration(msg: *const dc_msg_t) -> libc::c_int {
|
||||
if msg.is_null() || (*msg).magic != 0x11561156i32 as libc::c_uint {
|
||||
return false;
|
||||
return 0;
|
||||
}
|
||||
|
||||
0 != dc_param_get_int((*msg).param, 'd' as i32, 0i32)
|
||||
dc_param_get_int((*msg).param, 'd' as i32, 0i32)
|
||||
}
|
||||
|
||||
// TODO should return bool /rtn
|
||||
|
||||
Reference in New Issue
Block a user