Skip to content

Commit

Permalink
Replace printf by logg since we want this messages to go to the log
Browse files Browse the repository at this point in the history
  • Loading branch information
DL6ER committed Jun 26, 2017
1 parent ec613f9 commit 66ecea9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions database.c
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ void db_init(void)

if (pthread_mutex_init(&dblock, NULL) != 0)
{
printf("FATAL: DB mutex init failed\n");
logg("FATAL: DB mutex init failed\n");
// Return failure
exit(EXIT_FAILURE);
}
Expand All @@ -172,7 +172,7 @@ int db_get_FTL_property(unsigned int ID)

rc = sqlite3_prepare(db, querystring, -1, &dbstmt, NULL);
if( rc ){
printf("Cannot read from database: %s", sqlite3_errmsg(db));
logg("Cannot read from database: %s", sqlite3_errmsg(db));
dbclose();
return -1;
}
Expand All @@ -181,7 +181,7 @@ int db_get_FTL_property(unsigned int ID)
// Evaluate SQL statement
sqlite3_step(dbstmt);
if( rc ){
printf("Cannot evaluate in database: %s", sqlite3_errmsg(db));
logg("Cannot evaluate in database: %s", sqlite3_errmsg(db));
dbclose();
return -1;
}
Expand Down

0 comments on commit 66ecea9

Please sign in to comment.