Skip to content

Commit

Permalink
Fix: continue logging when not in portal start scene (#8)
Browse files Browse the repository at this point in the history
* continue logging when not in portal start scene

* removed comment

* added terminating character to prevent junk

* Revert "added terminating character to prevent junk"

This reverts commit d2410cd.
  • Loading branch information
bigbrodude6119 authored Jul 6, 2023
1 parent b040674 commit a257355
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
1 change: 0 additions & 1 deletion flipper/flipper-evil-portal/evil_portal_app.c
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,6 @@ int32_t evil_portal_app(void *p) {

view_dispatcher_run(evil_portal_app->view_dispatcher);

// crashing here
evil_portal_app_free(evil_portal_app);

return 0;
Expand Down
13 changes: 12 additions & 1 deletion flipper/flipper-evil-portal/evil_portal_uart.c
Original file line number Diff line number Diff line change
Expand Up @@ -82,13 +82,24 @@ static int32_t uart_worker(void *context) {
strcat(uart->app->portal_logs, (char *)uart->rx_buf);
}

if (strlen(uart->app->portal_logs) > 4000) {
write_logs(uart->app->portal_logs);
free(uart->app->portal_logs);
strcpy(uart->app->portal_logs, "");
}
} else {
uart->rx_buf[len] = '\0';
if (uart->app->sent_reset == false) {
strcat(uart->app->portal_logs, (char *)uart->rx_buf);
}

if (strlen(uart->app->portal_logs) > 4000) {
write_logs(uart->app->portal_logs);
free(uart->app->portal_logs);
strcpy(uart->app->portal_logs, "");
}
}
}
}
}
}

Expand Down

0 comments on commit a257355

Please sign in to comment.