MCPcopy Create free account
hub / github.com/DeusData/codebase-memory-mcp / host_log_close

Function host_log_close

src/daemon/host.c:162–178  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

160}
161
162static void host_log_close(void) {
163 cbm_log_set_sink(NULL);
164 cbm_ui_log_close();
165 if (g_host_log_mutex_initialized) {
166 cbm_mutex_lock(&g_host_log_mutex);
167 }
168 FILE *file = g_host_log_file;
169 g_host_log_file = NULL;
170 if (file) {
171 (void)fclose(file);
172 }
173 if (g_host_log_mutex_initialized) {
174 cbm_mutex_unlock(&g_host_log_mutex);
175 cbm_mutex_destroy(&g_host_log_mutex);
176 g_host_log_mutex_initialized = false;
177 }
178}
179
180static uint64_t host_deadline_after(uint32_t timeout_ms) {
181 uint64_t now = cbm_now_ms();

Callers 1

cbm_daemon_host_runFunction · 0.85

Calls 5

cbm_log_set_sinkFunction · 0.85
cbm_ui_log_closeFunction · 0.85
cbm_mutex_lockFunction · 0.85
cbm_mutex_unlockFunction · 0.85
cbm_mutex_destroyFunction · 0.85

Tested by

no test coverage detected