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

Function runtime_activation_response_decode

src/daemon/runtime.c:492–508  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Calls 2

runtime_get_u32Function · 0.85
runtime_get_u64Function · 0.85

Tested by

no test coverage detected