| 174 | } |
| 175 | |
| 176 | static void lrp_cleanup(LRP_Proj *lp, cbm_store_t *store) { |
| 177 | if (store) |
| 178 | cbm_store_close(store); |
| 179 | if (lp->srv) { |
| 180 | cbm_mcp_server_free(lp->srv); |
| 181 | lp->srv = NULL; |
| 182 | } |
| 183 | free(lp->project); |
| 184 | lp->project = NULL; |
| 185 | th_rmtree(lp->tmpdir); |
| 186 | unlink(lp->dbpath); |
| 187 | char wal[600], shm[600]; |
| 188 | snprintf(wal, sizeof(wal), "%s-wal", lp->dbpath); |
| 189 | snprintf(shm, sizeof(shm), "%s-shm", lp->dbpath); |
| 190 | unlink(wal); |
| 191 | unlink(shm); |
| 192 | } |
| 193 | |
| 194 | /* Returns USAGE edge count (-1 on DB failure). */ |
| 195 | static int lrp_usage(LRP_Proj *lp, const LRP_File *files, int nfiles) { |
no test coverage detected