| 110 | } |
| 111 | |
| 112 | static void r521_cleanup(R521Proj *lp, cbm_store_t *store) { |
| 113 | if (store) cbm_store_close(store); |
| 114 | if (lp->srv) { cbm_mcp_server_free(lp->srv); lp->srv = NULL; } |
| 115 | free(lp->project); lp->project = NULL; |
| 116 | th_rmtree(lp->tmpdir); |
| 117 | unlink(lp->dbpath); |
| 118 | char wal[600], shm[600]; |
| 119 | snprintf(wal, sizeof(wal), "%s-wal", lp->dbpath); |
| 120 | snprintf(shm, sizeof(shm), "%s-shm", lp->dbpath); |
| 121 | unlink(wal); unlink(shm); |
| 122 | } |
| 123 | |
| 124 | /* Count Route nodes in the indexed project. Returns -1 on error. */ |
| 125 | static int r521_count_routes(cbm_store_t *store, const char *project) { |
no test coverage detected