BugID:17646749: delete unnecessary topo delete operation
@@ -946,44 +946,6 @@ static int _iotx_linkkit_slave_connect(int devid)
return FAIL_RETURN;
}
- /* Subdev Delete Topo */
- res = iotx_dm_subdev_topo_del(devid);
- if (res < SUCCESS_RETURN) {
- return FAIL_RETURN;
- }
- msgid = res;
-
- semaphore = HAL_SemaphoreCreate();
- if (semaphore == NULL) {
- return FAIL_RETURN;
- }
-
- _iotx_linkkit_upstream_mutex_lock();
- res = _iotx_linkkit_upstream_sync_callback_list_insert(msgid, semaphore, &node);
- if (res != SUCCESS_RETURN) {
- HAL_SemaphoreDestroy(semaphore);
- _iotx_linkkit_upstream_mutex_unlock();
- return FAIL_RETURN;
- }
- _iotx_linkkit_upstream_mutex_unlock();
-
- res = HAL_SemaphoreWait(semaphore, IOTX_LINKKIT_SYNC_DEFAULT_TIMEOUT_MS);
- if (res < SUCCESS_RETURN) {
- _iotx_linkkit_upstream_mutex_lock();
- _iotx_linkkit_upstream_sync_callback_list_remove(msgid);
- _iotx_linkkit_upstream_mutex_unlock();
- return FAIL_RETURN;
- }
-
- _iotx_linkkit_upstream_mutex_lock();
- code = node->code;
- _iotx_linkkit_upstream_sync_callback_list_remove(msgid);
- if (code != SUCCESS_RETURN) {
- _iotx_linkkit_upstream_mutex_unlock();
- return FAIL_RETURN;
- }
- _iotx_linkkit_upstream_mutex_unlock();
-
/* Subdev Register */
res = iotx_dm_subdev_register(devid);
if (res < SUCCESS_RETURN) {
@@ -1256,7 +1218,6 @@ static int _iotx_linkkit_subdev_login(int devid)
((int (*)(const int))callback)(devid);
}
-
return res;
}
