Add i18n database attach and detach code
authorsung-su.kim <sung-su.kim@samsung.com>
Tue, 1 Oct 2013 12:11:43 +0000 (21:11 +0900)
committerGerrit Code Review <gerrit@gerrit.vlan144.tizendev.org>
Tue, 1 Oct 2013 12:33:46 +0000 (12:33 +0000)
[Issue#]   N/A
[Problem]  Installation fail to TCT.
[Cause]    Fail to database access for IANA locale check.
[Solution] Add i18n database attach and detach code.

[SCMRequest] N/A

Change-Id: I83648a1438e700ff63bba32cde34a8bb28b19d60

src/wrt-installer/wrt_installer_api.cpp

index cc2c84a..bbd0c3f 100644 (file)
@@ -41,6 +41,7 @@
 #include <wrt_type.h>
 #include <dpl/localization/w3c_file_localization.h>
 #include <dpl/wrt-dao-ro/WrtDatabase.h>
+#include <wrt-commons/i18n-dao-ro/i18n_database.h>
 #include <vcore/VCore.h>
 #include <installer_main_thread.h>
 #include <wrt_install_mode.h>
@@ -105,6 +106,7 @@ void wrt_installer_init(void *userdata,
             std::string(GlobalConfig::GetVCoreDatabaseFilePath()));
 
         InstallerMainThreadSingleton::Instance().AttachDatabases();
+        I18n::DB::Interface::attachDatabaseRO();
 
         _D("Prepare libxml2 to work in multithreaded program.");
         xmlInitParser();
@@ -145,6 +147,7 @@ void wrt_installer_shutdown()
                 TerminateEvent());
 
         InstallerMainThreadSingleton::Instance().DetachDatabases();
+        I18n::DB::Interface::detachDatabase();
 
         // This must be done after DetachDatabase
         ValidationCore::VCoreDeinit();