int agent_find_mot_enable_devices(int timeout)
{
GVariant *variant = NULL;
- int result = COMP_ERROR_NONE;
+ int result = COMP_ERROR_UNKNOWN;
GError *error = NULL;
if (NULL == agent.dbus_connection || NULL == agent.gproxy_agent_service) {
g_error_free(error);
return COMP_ERROR_IO_ERROR;
}
-
- g_timeout_add_seconds(timeout + 1, _find_device_timeout_cb, NULL);
+ if (COMP_ERROR_NONE == result)
+ g_timeout_add_seconds(timeout + 1, _find_device_timeout_cb, NULL);
return result;
}
int agent_find_mowned_devices(int timeout)
{
GVariant *variant = NULL;
- int result = COMP_ERROR_NONE;
+ int result = COMP_ERROR_UNKNOWN;
GError *error = NULL;
if (NULL == agent.dbus_connection || NULL == agent.gproxy_agent_service) {
g_error_free(error);
return COMP_ERROR_IO_ERROR;
}
-
- g_timeout_add_seconds(timeout + 1, _find_mowned_device_timeout_cb, NULL);
+ if (COMP_ERROR_NONE == result)
+ g_timeout_add_seconds(timeout + 1, _find_mowned_device_timeout_cb, NULL);
return result;
}