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

Function cli_scope_connect_attempt

tests/test_cli.c:1799–1811  ·  view source on GitHub ↗

One attempt to connect the parent's committed client to the host. */

Source from the content-addressed store, hash-verified

1797
1798/* One attempt to connect the parent's committed client to the host. */
1799static cli_scope_attempt_t cli_scope_connect_attempt(void *context) {
1800 cli_scope_fixture_t *fixture = context;
1801 cbm_daemon_runtime_connect_result_t result = {0};
1802 fixture->client = cbm_daemon_runtime_client_connect(fixture->endpoint, &fixture->identity,
1803 CLI_SCOPE_TIMEOUT_MS, &result);
1804 if (fixture->client) {
1805 return CLI_SCOPE_ANSWERED;
1806 }
1807 return result.status == CBM_DAEMON_RUNTIME_CONNECT_ERROR &&
1808 result.muted_endpoint_holder_pid != 0
1809 ? CLI_SCOPE_MUTE
1810 : CLI_SCOPE_REFUSED;
1811}
1812
1813static bool cli_scope_fixture_start(cli_scope_fixture_t *fixture, const char *tag) {
1814 memset(fixture, 0, sizeof(*fixture));

Callers

nothing calls this directly

Calls 1

Tested by

no test coverage detected