| 503 | } |
| 504 | |
| 505 | void cbm_ui_log_close(void) { |
| 506 | cbm_ui_log_init(); |
| 507 | cbm_mutex_lock(&g_log_mutex); |
| 508 | if (sqlite3_close(g_activity_db) == SQLITE_OK) { |
| 509 | g_activity_db = NULL; |
| 510 | g_activity_path[0] = '\0'; |
| 511 | } |
| 512 | cbm_mutex_unlock(&g_log_mutex); |
| 513 | } |
| 514 | |
| 515 | /* Append a printf-formatted fragment at *pos within a bufsz buffer, never |
| 516 | * advancing *pos past bufsz. snprintf returns the length it WOULD have written, |
no test coverage detected