Fix For PTREL-284 : Multi-User Architecture Change added review comments 90/15690/2 accepted/tizen/generic accepted/tizen/ivi/stable accepted/tizen/mobile accepted/tizen_ivi_release tizen_ivi_release accepted/tizen/generic/20140130.163325 accepted/tizen/generic/20140312.095231 accepted/tizen/ivi/20140130.173724 accepted/tizen/ivi/panda/20140312.111541 accepted/tizen/ivi/release/20140312.112737 accepted/tizen/mobile/20140224.083710 submit/tizen/20140130.101604 submit/tizen/20140312.070709 submit/tizen_ivi_release/20140312.071146
authorshivajm <shiva.jm@samsung.com>
Mon, 27 Jan 2014 04:57:22 +0000 (10:27 +0530)
committershivajm <shiva.jm@samsung.com>
Mon, 27 Jan 2014 06:52:36 +0000 (12:22 +0530)
Change-Id: I25a0d4639ced39125e2e67c85ab6c7122beae9f9
Signed-off-by: shivajm <shiva.jm@samsung.com>
CMakeLists.txt
packaging/tel-plugin-atmodem.spec
src/s_network.c

index d943aca..96c239b 100644 (file)
@@ -9,7 +9,7 @@ SET(INCLUDEDIR "\${prefix}/include")
 
 # Set required packages
 INCLUDE(FindPkgConfig)
-pkg_check_modules(pkgs REQUIRED glib-2.0 tcore dlog)
+pkg_check_modules(pkgs REQUIRED glib-2.0 tcore dlog libtzplatform-config)
 
 FOREACH(flag ${pkgs_CFLAGS})
        SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}")
index 5fbf357..b94482f 100644 (file)
@@ -13,6 +13,7 @@ BuildRequires:  cmake
 BuildRequires:  pkgconfig(glib-2.0)
 BuildRequires:  pkgconfig(dlog)
 BuildRequires:  pkgconfig(tcore)
+BuildRequires:  pkgconfig(libtzplatform-config)
 
 %description
 Telephony AT Modem library
@@ -28,23 +29,23 @@ make %{?jobs:-j%jobs}
 %post
 /sbin/ldconfig
 
-mkdir -p /opt/dbspace
+mkdir -p %{TZ_SYS_DB}
 
-if [ ! -f /opt/dbspace/.mcc_mnc_oper_list.db ]
+if [ ! -f %{TZ_SYS_DB}/.mcc_mnc_oper_list.db ]
 then
-       sqlite3 /opt/dbspace/.mcc_mnc_oper_list.db < /tmp/mcc_mnc_oper_list.sql
+       sqlite3 %{TZ_SYS_DB}/.mcc_mnc_oper_list.db < /tmp/mcc_mnc_oper_list.sql
 fi
 
 rm -f /tmp/mcc_mnc_oper_list.sql
 
-if [ -f /opt/dbspace/.mcc_mnc_oper_list.db ]
+if [ -f %{TZ_SYS_DB}/.mcc_mnc_oper_list.db ]
 then
-chmod 600 /opt/dbspace/.mcc_mnc_oper_list.db
+chmod 600 %{TZ_SYS_DB}/.mcc_mnc_oper_list.db
 fi
 
-if [ -f /opt/dbspace/.mcc_mnc_oper_list.db-journal ]
+if [ -f %{TZ_SYS_DB}/.mcc_mnc_oper_list.db-journal ]
 then
-chmod 644 /opt/dbspace/.mcc_mnc_oper_list.db-journal
+chmod 644 %{TZ_SYS_DB}/.mcc_mnc_oper_list.db-journal
 fi
 
 %postun -p /sbin/ldconfig
index 3a54b21..dfad647 100644 (file)
@@ -34,6 +34,7 @@
 #include <co_network.h>
 #include <server.h>
 #include <storage.h>
+#include <tzplatform_config.h>
 
 #include "s_common.h"
 #include "s_network.h"
@@ -135,12 +136,15 @@ static void _insert_mcc_mnc_oper_list(TcorePlugin *plugin, CoreObject *o)
        gpointer key, value;
        GHashTable *result = NULL, *row = NULL;
        struct tcore_network_operator_info *noi = NULL;
+       const char *path = NULL;
        int count = 0;
 
        s = tcore_plugin_ref_server(plugin);
        strg = tcore_server_find_storage(s, "database");
 
-       handle = tcore_storage_create_handle(strg, "/opt/dbspace/.mcc_mnc_oper_list.db");
+       path = tzplatform_mkpath(TZ_SYS_DB, ".mcc_mnc_oper_list.db");
+
+       handle = tcore_storage_create_handle(strg, path);
        if (!handle) {
                dbg("fail to create database handle");
                return;