mirror of
https://github.com/chatmail/core.git
synced 2026-05-09 01:46:30 +03:00
Return bool from export_self_keys
This commit is contained in:
@@ -520,7 +520,7 @@ pub unsafe fn dc_job_do_DC_JOB_IMEX_IMAP(context: &Context, job: &Job) {
|
|||||||
if ok_to_continue {
|
if ok_to_continue {
|
||||||
match what {
|
match what {
|
||||||
1 => {
|
1 => {
|
||||||
if 0 != export_self_keys(context, param1.as_ptr()) {
|
if export_self_keys(context, param1.as_ptr()) {
|
||||||
info!(context, "Import/export completed.",);
|
info!(context, "Import/export completed.",);
|
||||||
success = 1
|
success = 1
|
||||||
}
|
}
|
||||||
@@ -1004,8 +1004,7 @@ unsafe fn import_self_keys(context: &Context, dir_name: *const libc::c_char) ->
|
|||||||
imported_cnt
|
imported_cnt
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO should return bool /rtn
|
unsafe fn export_self_keys(context: &Context, dir: *const libc::c_char) -> bool {
|
||||||
unsafe fn export_self_keys(context: &Context, dir: *const libc::c_char) -> libc::c_int {
|
|
||||||
let mut export_errors = 0;
|
let mut export_errors = 0;
|
||||||
|
|
||||||
context
|
context
|
||||||
@@ -1047,11 +1046,7 @@ unsafe fn export_self_keys(context: &Context, dir: *const libc::c_char) -> libc:
|
|||||||
)
|
)
|
||||||
.unwrap();
|
.unwrap();
|
||||||
|
|
||||||
if export_errors == 0 {
|
export_errors == 0
|
||||||
1
|
|
||||||
} else {
|
|
||||||
0
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
|
|||||||
Reference in New Issue
Block a user