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

Function rh_cleanup

tests/repro/repro_harness.h:132–151  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

130}
131
132static inline void rh_cleanup(RProj *lp, cbm_store_t *store) {
133 if (store)
134 cbm_store_close(store);
135 if (lp->srv) {
136 cbm_mcp_server_free(lp->srv);
137 lp->srv = NULL;
138 }
139 free(lp->project);
140 lp->project = NULL;
141 th_rmtree(lp->tmpdir);
142 th_rmtree(lp->cachedir);
143 if (lp->dbpath[0]) {
144 unlink(lp->dbpath);
145 char wal[600], shm[600];
146 snprintf(wal, sizeof(wal), "%s-wal", lp->dbpath);
147 unlink(wal);
148 snprintf(shm, sizeof(shm), "%s-shm", lp->dbpath);
149 unlink(shm);
150 }
151}
152
153/* Count edges of a given type in the project graph. Returns -1 on query error. */
154static inline int rh_count_edges(cbm_store_t *store, const char *project, const char *edge) {

Callers 15

pipeline_batteryFunction · 0.85
repro_issue514.cFile · 0.85
repro_issue523.cFile · 0.85
pipeline_batteryFunction · 0.85
config_pipeline_batteryFunction · 0.85
pipeline_batteryFunction · 0.85
run_parity_caseFunction · 0.85
assert_lsp_strategyFunction · 0.85

Calls 3

cbm_store_closeFunction · 0.85
cbm_mcp_server_freeFunction · 0.85
th_rmtreeFunction · 0.85

Tested by

no test coverage detected