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

Function runtime_activation_request_decode

src/daemon/runtime.c:458–476  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Calls 2

runtime_get_u32Function · 0.85

Tested by

no test coverage detected