From ea62986928c7052b9af10cec00aeba17dbf85a3a Mon Sep 17 00:00:00 2001 From: Keith Whyte Date: Sat, 18 Jun 2022 02:51:51 +0100 Subject: [PATCH] Don't let this osmo-msc operate on a libdbi database The Binary format changed when libdbi was removed. If we let osmo-msc run on an unconverted database, the results are unpredictable, certainly undesirable. Change-Id: I887b6a4374b1c83684f4007e9791ae58bba4e8c1 --- src/libmsc/db.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/libmsc/db.c b/src/libmsc/db.c index 07081d54f..0237716e4 100644 --- a/src/libmsc/db.c +++ b/src/libmsc/db.c @@ -72,7 +72,7 @@ static struct db_context *g_dbc; * DATABASE SCHEMA AND MIGRATION ***********************************************************************/ -#define SCHEMA_REVISION "5" +#define SCHEMA_REVISION "6" enum { SCHEMA_META, @@ -480,14 +480,14 @@ static int check_db_revision(struct db_context *dbc) LOGP(DDB, LOGL_FATAL, "You must use osmo-msc 1.1.0 to 1.8.0 to upgrade database " "schema from '%u' to '5', sorry\n", db_rev); break; -#if 0 case 5: - if (update_db_revision_5()) - goto error; - - /* The end of waterfall */ + LOGP(DDB, LOGL_FATAL, "The storage format of BINARY data in the database " + "has changed. In order to deliver any pending SMS in your database, " + "you must manually convert your database from " + "'%u' to '6'. Alternatively you can use a fresh, blank database " + "with this version of osmo-msc, sorry.\n", db_rev); + return -1; break; -#endif default: LOGP(DDB, LOGL_FATAL, "Invalid database schema revision '%d'.\n", db_rev); return -EINVAL;