chiark / gitweb /
WIP routesearch: actually find the database
[ypp-sc-tools.main.git] / yarrg / rssql.c
index bfe60d6c8798be39920fa4cb50c88a336f2831de..26a77bb7811dd0be8fc504037a86b8a06f44a20d 100644 (file)
@@ -14,10 +14,10 @@ static int busy_handler(void *u, int previous) {
   return 1;
 }
 
-void setup_sql(void) {
+void setup_sql(const char *database) {
   sqlite3_stmt *sst;
   
-  SQL_MUST( sqlite3_open("OCEAN-Midnight.db", &db) );
+  SQL_MUST( sqlite3_open(database, &db) );
   SQL_MUST( sqlite3_busy_handler(db, busy_handler, 0) );
 
   sst= sql_prepare("BEGIN","(begin)");