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

Function replace_during_poll_callback

tests/test_watcher.c:3921–3930  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3919} replace_during_poll_ctx_t;
3920
3921static int replace_during_poll_callback(const char *name, const char *path, void *ud) {
3922 (void)path;
3923 replace_during_poll_ctx_t *ctx = ud;
3924 ctx->calls++;
3925 /* Re-registering can happen when a second daemon session initializes while
3926 * this project's watcher snapshot is being polled. The old state must stay
3927 * alive until the snapshot finishes using it. */
3928 cbm_watcher_watch(ctx->watcher, name, ctx->replacement_root);
3929 return 0;
3930}
3931
3932TEST(watcher_replace_during_poll_defers_old_state_free) {
3933 char original[256];

Callers

nothing calls this directly

Calls 1

cbm_watcher_watchFunction · 0.85

Tested by

no test coverage detected