summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortaesub kim <taesub.kim@samsung.com>2016-06-12 19:21:15 -0700
committerGerrit Code Review <gerrit@review.vlan103.tizen.org>2016-06-12 19:21:15 -0700
commit4ff7fd4d140e6b154d178f9ab83d019786617b53 (patch)
tree0491b1b6a07ea63013f6fcbcf5eb533aa87257ba
parent74b79a30bb7d74d9b7d3ff0e8dd122f64e847e5f (diff)
parent28801fe078345fde58f934bbfee79b5fb6f0d9bb (diff)
downloadconnman-4ff7fd4d140e6b154d178f9ab83d019786617b53.tar.gz
connman-4ff7fd4d140e6b154d178f9ab83d019786617b53.tar.bz2
connman-4ff7fd4d140e6b154d178f9ab83d019786617b53.zip
Merge "[SPIN] Enable the ntp by connman if device does not use the cellular." into tizen
-rwxr-xr-xpackaging/connman.spec4
-rwxr-xr-xsrc/clock.c6
-rwxr-xr-xsrc/main.c4
-rwxr-xr-xsrc/timeserver.c5
4 files changed, 19 insertions, 0 deletions
diff --git a/packaging/connman.spec b/packaging/connman.spec
index 4bf2d1a0..47f8552e 100755
--- a/packaging/connman.spec
+++ b/packaging/connman.spec
@@ -99,6 +99,10 @@ CFLAGS+=" -DTIZEN_TV_EXT"
%if %{with connman_vpnd}
VPN_CFLAGS+=" -DTIZEN_EXT -lsmack -Werror"
+
+%if 0%{?sec_product_feature_telephony_disable} == 1
+ CFLAGS+=" -DTIZEN_CONNMAN_NTP"
+%endif
%endif
chmod +x bootstrap
diff --git a/src/clock.c b/src/clock.c
index 0fde2c34..f04cf175 100755
--- a/src/clock.c
+++ b/src/clock.c
@@ -241,6 +241,11 @@ static DBusMessage *set_property(DBusConnection *conn,
type = dbus_message_iter_get_arg_type(&value);
if (g_str_equal(name, "Time")) {
+#if defined TIZEN_EXT
+ /* Tizen updates time (ntp) by system service */
+
+ return __connman_error_permission_denied(msg);
+#else
struct timeval tv;
dbus_uint64_t newval;
@@ -261,6 +266,7 @@ static DBusMessage *set_property(DBusConnection *conn,
connman_dbus_property_changed_basic(CONNMAN_MANAGER_PATH,
CONNMAN_CLOCK_INTERFACE, "Time",
DBUS_TYPE_UINT64, &newval);
+#endif
} else if (g_str_equal(name, "TimeUpdates")) {
const char *strval;
enum time_updates newval;
diff --git a/src/main.c b/src/main.c
index c594adb2..5bd7e16b 100755
--- a/src/main.c
+++ b/src/main.c
@@ -721,7 +721,9 @@ int main(int argc, char *argv[])
__connman_proxy_init();
__connman_detect_init();
__connman_session_init();
+#if !defined TIZEN_EXT || defined TIZEN_CONNMAN_NTP
__connman_timeserver_init();
+#endif
__connman_connection_init();
__connman_plugin_init(option_plugin, option_noplugin);
@@ -753,7 +755,9 @@ int main(int argc, char *argv[])
__connman_plugin_cleanup();
__connman_provider_cleanup();
__connman_connection_cleanup();
+#if !defined TIZEN_EXT || defined TIZEN_CONNMAN_NTP
__connman_timeserver_cleanup();
+#endif
__connman_detect_cleanup();
__connman_proxy_cleanup();
__connman_task_cleanup();
diff --git a/src/timeserver.c b/src/timeserver.c
index f0d33e5e..8b9afb13 100755
--- a/src/timeserver.c
+++ b/src/timeserver.c
@@ -290,6 +290,11 @@ static void ts_recheck_enable(void)
*/
int __connman_timeserver_sync(struct connman_service *default_service)
{
+#if defined TIZEN_EXT && !defined TIZEN_CONNMAN_NTP
+ /* Tizen updates time (ntp) by system service */
+
+ return 0;
+#endif
struct connman_service *service;
if (default_service)