[Problem]
-
[Cause]
-
[Solution]
- When dbus-call failed, log removed
- daemon check api add
Change-Id: Ibbc623a3e63b59b0d9abbf3e80ed3caf31469606
libwbxml2
dlog
dbus-glib-1
libwbxml2
dlog
dbus-glib-1
)
#############################################
)
#############################################
#include <glib.h>
#include <dbus/dbus-glib.h>
#include <glib.h>
#include <dbus/dbus-glib.h>
+#include <sysman_managed.h>
#ifndef SYNC_AGENT_LOG
#undef LOG_TAG
#ifndef SYNC_AGENT_LOG
#undef LOG_TAG
DBusGConnection *connection = NULL;
DBusGProxy *dbus_proxy = NULL;
DBusGConnection *connection = NULL;
DBusGProxy *dbus_proxy = NULL;
- gboolean bResult = FALSE;
_DEBUG_INFO("dbus_proxy %x", dbus_proxy);
//dbus_g_proxy_call_no_reply(dbus_proxy, "Hello_Agent", G_TYPE_INVALID);
_DEBUG_INFO("dbus_proxy %x", dbus_proxy);
//dbus_g_proxy_call_no_reply(dbus_proxy, "Hello_Agent", G_TYPE_INVALID);
- bResult = dbus_g_proxy_call(dbus_proxy, "Hello_Agent", &error, G_TYPE_INVALID, G_TYPE_INVALID);
-
- if (bResult == FALSE) {
- _DEBUG_ERROR("dbus_g_proxy_call failed: %s\n", error->message);
- g_error_free(error);
- g_object_unref(dbus_proxy);
- dbus_g_connection_unref(connection);
-
- _INNER_FUNC_EXIT;
- return -1;
- }
+ dbus_g_proxy_call(dbus_proxy, "Hello_Agent", &error, G_TYPE_INVALID, G_TYPE_INVALID);
g_object_unref(dbus_proxy);
dbus_g_connection_unref(connection);
g_object_unref(dbus_proxy);
dbus_g_connection_unref(connection);
sync_agent_ds_error_e result = SYNC_AGENT_DS_SUCCESS;
sync_agent_init_error_e init_error = SYNC_AGENT_INIT_SUCCESS;
int ret = -1;
sync_agent_ds_error_e result = SYNC_AGENT_DS_SUCCESS;
sync_agent_init_error_e init_error = SYNC_AGENT_INIT_SUCCESS;
int ret = -1;
- ret = _launch_omads_agent();
+ _DEBUG_INFO("before sysman_get_pid");
+ pid = sysman_get_pid("/usr/bin/oma-ds-agent");
+ _DEBUG_INFO("oma-ds-agent pid [%d]", pid);
- if (ret < 0 ) {
- _DEBUG_ERROR("_launch_omads_agent() failed !!");
- result = SYNC_AGENT_DS_FAIL;
+ if(pid == -1 ) {
+ ret = _launch_omads_agent();
+ if (ret < 0 ) {
+ _DEBUG_ERROR("_launch_omads_agent() failed !!");
+ result = SYNC_AGENT_DS_FAIL;
- _EXTERN_FUNC_EXIT;
- return result;
+ _EXTERN_FUNC_EXIT;
+ return result;
+ }
}
init_error = sync_agent_init(OMA_DS_CONFIG_FILE);
}
init_error = sync_agent_init(OMA_DS_CONFIG_FILE);
sync_agent_ds_error_e result = SYNC_AGENT_DS_SUCCESS;
sync_agent_deinit_error_e deinit = SYNC_AGENT_DEINIT_SUCCESS;
sync_agent_ds_error_e result = SYNC_AGENT_DS_SUCCESS;
sync_agent_deinit_error_e deinit = SYNC_AGENT_DEINIT_SUCCESS;
int ret = -1;
ret = _kill_omads_agent();
int ret = -1;
ret = _kill_omads_agent();