summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSegwon <segwon.han@samsung.com>2017-02-20 22:18:05 +0900
committerSegwon <segwon.han@samsung.com>2017-02-20 22:18:25 +0900
commitb5ed166e0b4b05c6adc520c41a462c5b7b410770 (patch)
tree824640f5712256546dabab1bcb5270efcd882fd6
parent5a605ed39bc77a77108e83af539b096c7d207c0e (diff)
downloadd2d-conv-setting-accepted/tizen_mobile.tar.gz
d2d-conv-setting-accepted/tizen_mobile.tar.bz2
d2d-conv-setting-accepted/tizen_mobile.zip
Modified to clone the device information using strdup function. Signed-off-by: Segwon <segwon.han@samsung.com> Change-Id: I3480b696a3d508e1192206558e28cd7d04e48675
-rw-r--r--src/ui/setting_item_device_list.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/ui/setting_item_device_list.c b/src/ui/setting_item_device_list.c
index a125126..40ef472 100644
--- a/src/ui/setting_item_device_list.c
+++ b/src/ui/setting_item_device_list.c
@@ -267,7 +267,7 @@ static void discovery_foreach_cb(conv_device_h device_h, int result, void *data)
conv_device_get_property_string(device_h, CONV_DEVICE_NAME, &device_name);
conv_device_get_property_string(device_h, CONV_DEVICE_TYPE, &device_type);
- if (device_id == NULL | device_name == NULL | device_type == NULL) {
+ if (device_id == NULL || device_name == NULL || device_type == NULL) {
goto MEMORY_FREE;
}
@@ -287,9 +287,9 @@ static void discovery_foreach_cb(conv_device_h device_h, int result, void *data)
discovered_devices_info[index] = (device_info_s *) calloc(sizeof(device_info_s), 1);
discovered_devices_info[index]->list_type = LIST_TYPE_DISCOVERED;
discovered_devices_info[index]->index = index;
- discovered_devices_info[index]->name = device_name;
- discovered_devices_info[index]->type = device_type;
- discovered_devices_info[index]->mac_address = device_id;
+ discovered_devices_info[index]->name = strdup(device_name);
+ discovered_devices_info[index]->type = strdup(device_type);
+ discovered_devices_info[index]->mac_address = strdup(device_id);
elm_genlist_item_append(discovered_list, device_item_builder, discovered_devices_info[index], discovered_device_group, ELM_GENLIST_ITEM_NONE, device_list_select_cb, discovered_devices_info[index]);
elm_genlist_item_fields_update(discovered_device_group, "elm.swallow.end", ELM_GENLIST_ITEM_FIELD_CONTENT);