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

Function runtime_activation_response_decode

src/daemon/runtime.c:496–512  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

494}
495
496static bool runtime_activation_response_decode(
497 const uint8_t payload[CBM_DAEMON_ACTIVATION_SHUTDOWN_RESPONSE_SIZE],
498 cbm_daemon_runtime_activation_result_t *result_out) {
499 if (!payload || !result_out ||
500 runtime_get_u32(payload + ACTIVATION_RESPONSE_ABI_OFFSET) != CBM_DAEMON_RENDEZVOUS_ABI) {
501 return false;
502 }
503 uint32_t accepted = runtime_get_u32(payload + ACTIVATION_RESPONSE_ACCEPTED_OFFSET);
504 if (accepted > 1U) {
505 return false;
506 }
507 result_out->accepted = accepted == 1U;
508 result_out->active_clients = runtime_get_u64(payload + ACTIVATION_RESPONSE_CLIENTS_OFFSET);
509 result_out->active_connections =
510 runtime_get_u64(payload + ACTIVATION_RESPONSE_CONNECTIONS_OFFSET);
511 return true;
512}
513
514static uint64_t runtime_current_process_id(void) {
515#ifdef _WIN32

Calls 2

runtime_get_u32Function · 0.85
runtime_get_u64Function · 0.85

Tested by

no test coverage detected