mirror of
https://github.com/deltachat/deltachat-core.git
synced 2025-10-04 18:29:19 +02:00
do not show debug info on program startup
This commit is contained in:
parent
ad044d86ef
commit
c73a5612fa
1 changed files with 8 additions and 1 deletions
|
@ -51,6 +51,9 @@ static char* read_cmd(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static int s_do_log_info = 0;
|
||||||
|
|
||||||
|
|
||||||
static uintptr_t receive_event(mrmailbox_t* mailbox, int event, uintptr_t data1, uintptr_t data2)
|
static uintptr_t receive_event(mrmailbox_t* mailbox, int event, uintptr_t data1, uintptr_t data2)
|
||||||
{
|
{
|
||||||
switch( event )
|
switch( event )
|
||||||
|
@ -61,7 +64,9 @@ static uintptr_t receive_event(mrmailbox_t* mailbox, int event, uintptr_t data1,
|
||||||
break; /* do not show the event as this would fill the screen */
|
break; /* do not show the event as this would fill the screen */
|
||||||
|
|
||||||
case MR_EVENT_INFO:
|
case MR_EVENT_INFO:
|
||||||
printf("%s\n", (char*)data2);
|
if( s_do_log_info ) {
|
||||||
|
printf("%s\n", (char*)data2);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case MR_EVENT_WARNING:
|
case MR_EVENT_WARNING:
|
||||||
|
@ -139,6 +144,8 @@ int main(int argc, char ** argv)
|
||||||
|
|
||||||
stress_functions(mailbox);
|
stress_functions(mailbox);
|
||||||
|
|
||||||
|
s_do_log_info = 1;
|
||||||
|
|
||||||
/* wait for command */
|
/* wait for command */
|
||||||
while(1)
|
while(1)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue