mirror of
https://github.com/deltachat/deltachat-core.git
synced 2025-10-04 18:29:19 +02:00
send at least one MR_EVENT_IMEX_PROGRESS event.
This commit is contained in:
parent
48ab655372
commit
9f05277398
2 changed files with 8 additions and 2 deletions
|
@ -86,8 +86,12 @@ static uintptr_t receive_event(mrmailbox_t* mailbox, int event, uintptr_t data1,
|
||||||
return (uintptr_t)ret;
|
return (uintptr_t)ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
case MR_EVENT_IMEX_PROGRESS:
|
||||||
|
printf("{{Received event MR_EVENT_IMEX_PROGRESS(%i ‰)}}\n", (int)data1);
|
||||||
|
break;
|
||||||
|
|
||||||
case MR_EVENT_IMEX_FILE_WRITTEN:
|
case MR_EVENT_IMEX_FILE_WRITTEN:
|
||||||
printf("{{Received event MR_EVENT_IMEX_FILE_WRITTEN (%s, %s)}}\n", (char*)data1, (char*)data2);
|
printf("{{Received event MR_EVENT_IMEX_FILE_WRITTEN(%s)}}\n", (char*)data1);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
|
@ -885,6 +885,7 @@ int mrmailbox_imex(mrmailbox_t* mailbox, int what, const char* param1, const cha
|
||||||
s_imex_do_exit = 0;
|
s_imex_do_exit = 0;
|
||||||
|
|
||||||
mrmailbox_log_info(mailbox, 0, "Import/export process started.");
|
mrmailbox_log_info(mailbox, 0, "Import/export process started.");
|
||||||
|
mailbox->m_cb(mailbox, MR_EVENT_IMEX_PROGRESS, 0, 0);
|
||||||
|
|
||||||
if( !mrsqlite3_is_open(mailbox->m_sql) ) {
|
if( !mrsqlite3_is_open(mailbox->m_sql) ) {
|
||||||
mrmailbox_log_error(mailbox, 0, "Import/export: Database not opened.");
|
mrmailbox_log_error(mailbox, 0, "Import/export: Database not opened.");
|
||||||
|
@ -940,6 +941,7 @@ int mrmailbox_imex(mrmailbox_t* mailbox, int what, const char* param1, const cha
|
||||||
success = 1;
|
success = 1;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
|
mailbox->m_cb(mailbox, MR_EVENT_IMEX_PROGRESS, 1000, 0);
|
||||||
mrmailbox_log_info(mailbox, 0, "Import/export process ended.");
|
mrmailbox_log_info(mailbox, 0, "Import/export process ended.");
|
||||||
s_imex_do_exit = 1; /* avoids mrmailbox_imex_cancel() to stop the thread */
|
s_imex_do_exit = 1; /* avoids mrmailbox_imex_cancel() to stop the thread */
|
||||||
s_imex_running = 0;
|
s_imex_running = 0;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue