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

Function runtime_activation_request_decode

src/daemon/runtime.c:450–468  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

448}
449
450static bool runtime_activation_request_decode(
451 const uint8_t payload[CBM_DAEMON_ACTIVATION_SHUTDOWN_REQUEST_SIZE],
452 cbm_daemon_runtime_activation_action_t *action_out, char version[CBM_DAEMON_VERSION_TEXT_SIZE],
453 char build[CBM_DAEMON_BUILD_FINGERPRINT_SIZE]) {
454 if (!payload || !action_out || !version || !build) {
455 return false;
456 }
457 uint32_t raw_action = runtime_get_u32(payload + ACTIVATION_REQUEST_ACTION_OFFSET);
458 if (raw_action < (uint32_t)CBM_DAEMON_RUNTIME_ACTIVATION_INSTALL ||
459 raw_action > (uint32_t)CBM_DAEMON_RUNTIME_ACTIVATION_UNINSTALL ||
460 !runtime_rendezvous_request_decode(payload + ACTIVATION_REQUEST_IDENTITY_OFFSET, version,
461 build)) {
462 return false;
463 }
464 cbm_daemon_runtime_activation_action_t action =
465 (cbm_daemon_runtime_activation_action_t)raw_action;
466 *action_out = action;
467 return true;
468}
469
470static bool runtime_activation_response_encode(
471 uint8_t out[CBM_DAEMON_ACTIVATION_SHUTDOWN_RESPONSE_SIZE],

Calls 2

runtime_get_u32Function · 0.85

Tested by

no test coverage detected