mirror of
https://github.com/deltachat/deltachat-core.git
synced 2025-10-04 18:29:19 +02:00
in the demo, on exit, wait until the threads are finished; bug fixed
This commit is contained in:
parent
682b5e99e9
commit
dd1b98316d
2 changed files with 8 additions and 1 deletions
|
@ -186,6 +186,11 @@ static void stop_threads(dc_context_t* mailbox)
|
||||||
imap_foreground = 0;
|
imap_foreground = 0;
|
||||||
dc_interrupt_imap_idle(mailbox);
|
dc_interrupt_imap_idle(mailbox);
|
||||||
dc_interrupt_smtp_idle(mailbox);
|
dc_interrupt_smtp_idle(mailbox);
|
||||||
|
|
||||||
|
// wait until the threads are finished
|
||||||
|
while( imap_thread || smtp_thread ) {
|
||||||
|
usleep(100*1000);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -676,6 +676,8 @@ dc_chat_t* dc_get_chat(dc_context_t* context, uint32_t chat_id)
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
success = 1;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
if( success ) {
|
if( success ) {
|
||||||
return obj;
|
return obj;
|
||||||
|
@ -3362,7 +3364,7 @@ void dc_marknoticed_contact(dc_context_t* context, uint32_t contact_id)
|
||||||
|
|
||||||
void dc_block_chat(dc_context_t* context, uint32_t chat_id, int new_blocking)
|
void dc_block_chat(dc_context_t* context, uint32_t chat_id, int new_blocking)
|
||||||
{
|
{
|
||||||
sqlite3_stmt* stmt;
|
sqlite3_stmt* stmt = NULL;
|
||||||
|
|
||||||
if( context == NULL || context->m_magic != DC_CONTEXT_MAGIC ) {
|
if( context == NULL || context->m_magic != DC_CONTEXT_MAGIC ) {
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue