MA_LOGI("Discovering Multiple Ownership Transfer enabled Devices on Network..");
+ /* delete mot device lists before updating them */
+ _remove_mot_client();
+
g_mutex_lock(&iotivity_mutex);
OCDiscoverMultipleOwnerEnabledDevices(con->timeout, &g_client->g_motdev_list);
g_mutex_unlock(&iotivity_mutex);
return MA_ERROR_OUT_OF_MEMORY;
}
+ con->userdata = service;
+ con->cid = MA_DISC_MOT_ENB_DEVS;
+
+ if (timeout < 1)
+ timeout = DISCOVERY_TIMEOUT;
+ con->timeout = timeout;
+
con->thread = g_thread_try_new("disc_mot_env_devs", _disc_mot_env_devs_func, con, NULL);
if (!con->thread) {
MA_LOGE("Failed to create thread");
}
g_thread_unref(con->thread);
- /* delete un/owned device lists before updating them */
- _remove_mot_client();
-
- con->userdata = service;
- con->cid = MA_DISC_MOT_ENB_DEVS;
-
- if (timeout < 1)
- timeout = DISCOVERY_TIMEOUT;
- con->timeout = timeout;
-
#ifdef TIMEOUT_USED
con->tid = g_timeout_add_seconds(timeout * 2, _ma_timeout_cb, con);
#endif
MA_LOGD("[IPC] Discovery MOT enabled devices");
/* If we are working now? */
+ /*
if (g_atomic_int_get(&service->pending))
return MA_ERROR_IN_PROGRESS;
+ */
/* Set d2ds status 'pending' */
- g_atomic_int_set(&service->pending, 1);
+ //g_atomic_int_set(&service->pending, 1);
ret = _disc_mot_enb_devs(service, timeout);
MA_LOGD("[IPC] Discovery Owned devices");
/* If we are working now? */
+ /*
if (g_atomic_int_get(&service->pending))
return MA_ERROR_IN_PROGRESS;
+ */
/* Set d2ds status 'pending' */
- g_atomic_int_set(&service->pending, 1);
+ //g_atomic_int_set(&service->pending, 1);
ret = _disc_owned_devs(service, timeout);