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

Function pb_cleanup

tests/test_grammar_probe_b.c:115–125  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

113}
114
115static void pb_cleanup(ProbeLangProj *lp, cbm_store_t *store) {
116 if (store) cbm_store_close(store);
117 if (lp->srv) { cbm_mcp_server_free(lp->srv); lp->srv = NULL; }
118 free(lp->project); lp->project = NULL;
119 th_rmtree(lp->tmpdir);
120 unlink(lp->dbpath);
121 char wal[600], shm[600];
122 snprintf(wal, sizeof(wal), "%s-wal", lp->dbpath);
123 snprintf(shm, sizeof(shm), "%s-shm", lp->dbpath);
124 unlink(wal); unlink(shm);
125}
126
127/* Count nodes by label. Returns -1 on store error. */
128static int pb_count_label(cbm_store_t *store, const char *project, const char *label) {

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