| 163 | } |
| 164 | |
| 165 | static void lrp_cleanup(LRP_Proj *lp, cbm_store_t *store) { |
| 166 | if (store) cbm_store_close(store); |
| 167 | if (lp->srv) { cbm_mcp_server_free(lp->srv); lp->srv = NULL; } |
| 168 | free(lp->project); lp->project = NULL; |
| 169 | th_rmtree(lp->tmpdir); |
| 170 | unlink(lp->dbpath); |
| 171 | char wal[600], shm[600]; |
| 172 | snprintf(wal, sizeof(wal), "%s-wal", lp->dbpath); |
| 173 | snprintf(shm, sizeof(shm), "%s-shm", lp->dbpath); |
| 174 | unlink(wal); unlink(shm); |
| 175 | } |
| 176 | |
| 177 | /* Returns USAGE edge count (-1 on DB failure). */ |
| 178 | static int lrp_usage(LRP_Proj *lp, const LRP_File *files, int nfiles) { |
no test coverage detected