From a878da624f19ffa04e72a8a7a367b333d9b802e1 Mon Sep 17 00:00:00 2001 From: Simon Morlat Date: Sat, 3 Dec 2016 13:28:14 +0100 Subject: [PATCH] fix compilation issues when sqlite storage is disabled --- coreapi/sqlite3_bctbx_vfs.c | 3 ++- tester/message_tester.c | 5 ++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/coreapi/sqlite3_bctbx_vfs.c b/coreapi/sqlite3_bctbx_vfs.c index 0926f0ddc..24cab5bed 100755 --- a/coreapi/sqlite3_bctbx_vfs.c +++ b/coreapi/sqlite3_bctbx_vfs.c @@ -284,7 +284,7 @@ static char* ConvertFromUtf8Filename(const char* fName){ return bctbx_strdup(db_file_locale); #endif } -#endif + /** * Opens the file fName and populates the structure pointed by p * with the necessary io_methods @@ -452,3 +452,4 @@ void sqlite3_bctbx_vfs_unregister(void) sqlite3_vfs_unregister(pVfs); } +#endif /*SQLITE_STORAGE_ENABLED*/ diff --git a/tester/message_tester.c b/tester/message_tester.c index 7662dd290..d4e217f30 100644 --- a/tester/message_tester.c +++ b/tester/message_tester.c @@ -1505,9 +1505,12 @@ static void real_time_text(bool_t audio_stream_enabled, bool_t srtp_enabled, boo if (sql_storage) { linphone_core_set_chat_database_path(marie->lc, marie_db); - BC_ASSERT_PTR_NOT_NULL(marie->lc->db); linphone_core_set_chat_database_path(pauline->lc, pauline_db); +#ifdef SQLITE_STORAGE_ENABLED + BC_ASSERT_PTR_NOT_NULL(marie->lc->db); BC_ASSERT_PTR_NOT_NULL(pauline->lc->db); +#endif + if (do_not_store_rtt_messages_in_sql_storage) { lp_config_set_int(marie->lc->config, "misc", "store_rtt_messages", 0); lp_config_set_int(pauline->lc->config, "misc", "store_rtt_messages", 0);