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

Function runtime_activation_request_decode

src/daemon/runtime.c:565–583  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

563}
564
565static bool runtime_activation_request_decode(
566 const uint8_t payload[CBM_DAEMON_ACTIVATION_SHUTDOWN_REQUEST_SIZE],
567 cbm_daemon_runtime_activation_action_t *action_out, char version[CBM_DAEMON_VERSION_TEXT_SIZE],
568 char build[CBM_DAEMON_BUILD_FINGERPRINT_SIZE]) {
569 if (!payload || !action_out || !version || !build) {
570 return false;
571 }
572 uint32_t raw_action = runtime_get_u32(payload + ACTIVATION_REQUEST_ACTION_OFFSET);
573 if (raw_action < (uint32_t)CBM_DAEMON_RUNTIME_ACTIVATION_INSTALL ||
574 raw_action > (uint32_t)CBM_DAEMON_RUNTIME_ACTIVATION_UNINSTALL ||
575 !runtime_rendezvous_request_decode(payload + ACTIVATION_REQUEST_IDENTITY_OFFSET, version,
576 build)) {
577 return false;
578 }
579 cbm_daemon_runtime_activation_action_t action =
580 (cbm_daemon_runtime_activation_action_t)raw_action;
581 *action_out = action;
582 return true;
583}
584
585static bool runtime_activation_response_encode(
586 uint8_t out[CBM_DAEMON_ACTIVATION_SHUTDOWN_RESPONSE_SIZE],

Calls 2

runtime_get_u32Function · 0.85

Tested by

no test coverage detected