[Midnightbsd-cvs] mports [19033] trunk/Tools/magus/bless/magus-bless.cxx: return an error if we cant connect.
laffer1 at midnightbsd.org
laffer1 at midnightbsd.org
Sat May 16 10:09:58 EDT 2015
Revision: 19033
http://svnweb.midnightbsd.org/mports/?rev=19033
Author: laffer1
Date: 2015-05-16 10:09:57 -0400 (Sat, 16 May 2015)
Log Message:
-----------
return an error if we cant connect. fix the bool column for restricted checks
Modified Paths:
--------------
trunk/Tools/magus/bless/magus-bless.cxx
Modified: trunk/Tools/magus/bless/magus-bless.cxx
===================================================================
--- trunk/Tools/magus/bless/magus-bless.cxx 2015-05-16 14:08:31 UTC (rev 19032)
+++ trunk/Tools/magus/bless/magus-bless.cxx 2015-05-16 14:09:57 UTC (rev 19033)
@@ -57,7 +57,7 @@
{
char query_def[1000];
int runid;
- sqlite3 *db;
+ sqlite3 *db = NULL;
sqlite3_stmt *stmt;
char *fileHash;
char *filePath;
@@ -83,7 +83,7 @@
cout << "We are connected to " << C.dbname() << endl;
} else {
cout << "We are not connected! Check username and password." << endl;
- return 0;
+ return -1;
}
sprintf(query_def,
@@ -112,7 +112,7 @@
continue;
}
- if (row[5].as(boolean()))
+ if (row[6].as(bool()))
{
fprintf(stderr, "File %s is restricted and will be removed.\n", filePath);
unlink(filePath);
More information about the Midnightbsd-cvs
mailing list