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

Function replace_during_poll_callback

tests/test_watcher.c:2935–2944  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2933} replace_during_poll_ctx_t;
2934
2935static int replace_during_poll_callback(const char *name, const char *path, void *ud) {
2936 (void)path;
2937 replace_during_poll_ctx_t *ctx = ud;
2938 ctx->calls++;
2939 /* Re-registering can happen when a second daemon session initializes while
2940 * this project's watcher snapshot is being polled. The old state must stay
2941 * alive until the snapshot finishes using it. */
2942 cbm_watcher_watch(ctx->watcher, name, ctx->replacement_root);
2943 return 0;
2944}
2945
2946TEST(watcher_replace_during_poll_defers_old_state_free) {
2947 char original[256];

Callers

nothing calls this directly

Calls 1

cbm_watcher_watchFunction · 0.85

Tested by

no test coverage detected