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

Function runtime_activation_request_decode

src/daemon/runtime.c:462–480  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

460}
461
462static bool runtime_activation_request_decode(
463 const uint8_t payload[CBM_DAEMON_ACTIVATION_SHUTDOWN_REQUEST_SIZE],
464 cbm_daemon_runtime_activation_action_t *action_out, char version[CBM_DAEMON_VERSION_TEXT_SIZE],
465 char build[CBM_DAEMON_BUILD_FINGERPRINT_SIZE]) {
466 if (!payload || !action_out || !version || !build) {
467 return false;
468 }
469 uint32_t raw_action = runtime_get_u32(payload + ACTIVATION_REQUEST_ACTION_OFFSET);
470 if (raw_action < (uint32_t)CBM_DAEMON_RUNTIME_ACTIVATION_INSTALL ||
471 raw_action > (uint32_t)CBM_DAEMON_RUNTIME_ACTIVATION_UNINSTALL ||
472 !runtime_rendezvous_request_decode(payload + ACTIVATION_REQUEST_IDENTITY_OFFSET, version,
473 build)) {
474 return false;
475 }
476 cbm_daemon_runtime_activation_action_t action =
477 (cbm_daemon_runtime_activation_action_t)raw_action;
478 *action_out = action;
479 return true;
480}
481
482static bool runtime_activation_response_encode(
483 uint8_t out[CBM_DAEMON_ACTIVATION_SHUTDOWN_RESPONSE_SIZE],

Calls 2

runtime_get_u32Function · 0.85

Tested by

no test coverage detected