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

Function runtime_activation_response_decode

src/daemon/runtime.c:599–615  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

597}
598
599static bool runtime_activation_response_decode(
600 const uint8_t payload[CBM_DAEMON_ACTIVATION_SHUTDOWN_RESPONSE_SIZE],
601 cbm_daemon_runtime_activation_result_t *result_out) {
602 if (!payload || !result_out ||
603 runtime_get_u32(payload + ACTIVATION_RESPONSE_ABI_OFFSET) != CBM_DAEMON_RENDEZVOUS_ABI) {
604 return false;
605 }
606 uint32_t accepted = runtime_get_u32(payload + ACTIVATION_RESPONSE_ACCEPTED_OFFSET);
607 if (accepted > 1U) {
608 return false;
609 }
610 result_out->accepted = accepted == 1U;
611 result_out->active_clients = runtime_get_u64(payload + ACTIVATION_RESPONSE_CLIENTS_OFFSET);
612 result_out->active_connections =
613 runtime_get_u64(payload + ACTIVATION_RESPONSE_CONNECTIONS_OFFSET);
614 return true;
615}
616
617static uint64_t runtime_current_process_id(void) {
618#ifdef _WIN32

Calls 2

runtime_get_u32Function · 0.85
runtime_get_u64Function · 0.85

Tested by

no test coverage detected