From 898ce6ddba2ea5e19ce4968bd4e08735abeb3c47 Mon Sep 17 00:00:00 2001 From: "intae, jeon" Date: Wed, 9 Nov 2016 15:00:09 +0900 Subject: fix spec for email booting policy Change-Id: I4aecf71130b41095e6604a2f467bab2cc4fb41e9 Signed-off-by: intae, jeon --- email-daemon/email-daemon-init.c | 8 ++++++++ packaging/email-service.spec | 3 +++ 2 files changed, 11 insertions(+) diff --git a/email-daemon/email-daemon-init.c b/email-daemon/email-daemon-init.c index 427f0b1..f61de58 100755 --- a/email-daemon/email-daemon-init.c +++ b/email-daemon/email-daemon-init.c @@ -320,6 +320,14 @@ static void callback_for_NETWORK_STATUS(connection_type_e new_conn_type, void *i goto FINISH_OFF; } + /* initialize imap idle connection if network connection type is changed */ + if (conn_type != new_conn_type) { + + EM_DEBUG_LOG("connection type is changed. initializing imap idle connection"); + emcore_refresh_imap_idle_thread(); + + } + for (i = 0; i < account_count ; i++) { account_info = account_list + i; /* check if inbox folder sync is finished */ diff --git a/packaging/email-service.spec b/packaging/email-service.spec index 8203d84..9aeff34 100755 --- a/packaging/email-service.spec +++ b/packaging/email-service.spec @@ -120,7 +120,9 @@ cp -f res/%{name}.sql %{buildroot}%{upgrade_data_path} %make_install mkdir -p %{buildroot}%{_unitdir_user} +mkdir -p %{buildroot}%{_unitdir_user}/basic.target.wants install -m 0644 %{SOURCE4} %{buildroot}%{_unitdir_user}/email-service.service +ln -s ../email-service.service %{buildroot}%{_unitdir_user}/basic.target.wants/email-service.service mkdir -p %{buildroot}%{_unitdir_user}/sockets.target.wants install -m 0644 %{SOURCE1} %{buildroot}%{_unitdir_user}/email-service.socket @@ -160,6 +162,7 @@ systemctl daemon-reload %{_bindir}/email-service %{_libdir}/lib*.so.* %{_unitdir_user}/email-service.service +%{_unitdir_user}/basic.target.wants/email-service.service %{_unitdir_user}/email-service.socket %{_unitdir_user}/sockets.target.wants/email-service.socket %{_datarootdir}/dbus-1/services/email-service.service -- cgit v1.2.3