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

Function cp_cleanup

tests/test_convergence_probe.c:241–251  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

239}
240
241static void cp_cleanup(CP_Proj *lp, cbm_store_t *store) {
242 if (store) cbm_store_close(store);
243 if (lp->srv) { cbm_mcp_server_free(lp->srv); lp->srv = NULL; }
244 free(lp->project); lp->project = NULL;
245 th_rmtree(lp->tmpdir);
246 unlink(lp->dbpath);
247 char wal[600], shm[600];
248 snprintf(wal, sizeof(wal), "%s-wal", lp->dbpath);
249 snprintf(shm, sizeof(shm), "%s-shm", lp->dbpath);
250 unlink(wal); unlink(shm);
251}
252
253/* Count edges of `edge_type`; -1 on DB error. */
254static int cp_edges(cbm_store_t *store, const char *project, const char *edge_type) {

Callers 1

Calls 3

cbm_store_closeFunction · 0.85
cbm_mcp_server_freeFunction · 0.85
th_rmtreeFunction · 0.85

Tested by

no test coverage detected