| 239 | } |
| 240 | |
| 241 | static 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. */ |
| 254 | static int cp_edges(cbm_store_t *store, const char *project, const char *edge_type) { |
no test coverage detected