diff options
| author | Adam Ierymenko <adam.ierymenko@gmail.com> | 2015-07-29 15:09:23 -0700 |
|---|---|---|
| committer | Adam Ierymenko <adam.ierymenko@gmail.com> | 2015-07-29 15:09:23 -0700 |
| commit | fcc5bf1e6695c9bfa0aff8d69ebe005043397967 (patch) | |
| tree | aa210ccd90041badd15b9c0b328709b1d3134099 /controller/SqliteNetworkController.cpp | |
| parent | 7578b5629849f6c286c353dce713b0816b1cc4a9 (diff) | |
| download | infinitytier-fcc5bf1e6695c9bfa0aff8d69ebe005043397967.tar.gz infinitytier-fcc5bf1e6695c9bfa0aff8d69ebe005043397967.zip | |
Go ahead and spec out controller DB support for AuthToken -- GitHub issue #211 -- even though full implementation won't make it into 1.0.4.
Diffstat (limited to 'controller/SqliteNetworkController.cpp')
| -rw-r--r-- | controller/SqliteNetworkController.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/controller/SqliteNetworkController.cpp b/controller/SqliteNetworkController.cpp index 50be5b34..c95d3b74 100644 --- a/controller/SqliteNetworkController.cpp +++ b/controller/SqliteNetworkController.cpp @@ -146,9 +146,10 @@ SqliteNetworkController::SqliteNetworkController(const char *dbPath) : // Prepare statement will fail if Config table doesn't exist, which means our DB // needs to be initialized. if (sqlite3_exec(_db,ZT_NETCONF_SCHEMA_SQL"INSERT INTO Config (k,v) VALUES ('schemaVersion',"ZT_NETCONF_SQLITE_SCHEMA_VERSION_STR");",0,0,0) != SQLITE_OK) { - //printf("%s\n",sqlite3_errmsg(_db)); + char err[1024]; + Utils::snprintf(err,sizeof(err),"SqliteNetworkController cannot initialize database and/or insert schemaVersion into Config table: %s",sqlite3_errmsg(_db)); sqlite3_close(_db); - throw std::runtime_error("SqliteNetworkController cannot initialize database and/or insert schemaVersion into Config table"); + throw std::runtime_error(err); } } |
