summaryrefslogtreecommitdiff
path: root/ug-wifidirect
diff options
context:
space:
mode:
Diffstat (limited to 'ug-wifidirect')
-rwxr-xr-xug-wifidirect/src/wfd_client.c5
-rwxr-xr-xug-wifidirect/src/wfd_ug_genlist.c14
2 files changed, 9 insertions, 10 deletions
diff --git a/ug-wifidirect/src/wfd_client.c b/ug-wifidirect/src/wfd_client.c
index f1f1e93..e46ba00 100755
--- a/ug-wifidirect/src/wfd_client.c
+++ b/ug-wifidirect/src/wfd_client.c
@@ -598,10 +598,13 @@ bool _wfd_connected_peer_cb(wifi_direct_connected_peer_info_s *peer, void *user_
WDUG_LOGI("%dth connected peer. [%s] [%s]\n", peer_cnt, peer->device_name, peer->mac_address);
- strncpy(ugd->raw_connected_peers[peer_cnt].ssid, peer->device_name, sizeof(ugd->raw_connected_peers[peer_cnt].ssid));
+ strncpy(ugd->raw_connected_peers[peer_cnt].ssid, peer->device_name, SSID_LENGTH);
+ ugd->raw_connected_peers[peer_cnt].ssid[SSID_LENGTH-1] = '\0';
ugd->raw_connected_peers[peer_cnt].category = peer->primary_device_type;
strncpy(ugd->raw_connected_peers[peer_cnt].mac_addr, peer->mac_address, MAC_LENGTH);
+ ugd->raw_connected_peers[peer_cnt].mac_addr[MAC_LENGTH-1] = '\0';
strncpy(ugd->raw_connected_peers[peer_cnt].if_addr, peer->interface_address, MAC_LENGTH);
+ ugd->raw_connected_peers[peer_cnt].if_addr[MAC_LENGTH-1] = '\0';
ugd->raw_connected_peers[peer_cnt].conn_status = PEER_CONN_STATUS_CONNECTED;
WDUG_LOGI("\tStatus: [%d]\n", ugd->raw_connected_peers[peer_cnt].conn_status);
diff --git a/ug-wifidirect/src/wfd_ug_genlist.c b/ug-wifidirect/src/wfd_ug_genlist.c
index 64474ce..bff197c 100755
--- a/ug-wifidirect/src/wfd_ug_genlist.c
+++ b/ug-wifidirect/src/wfd_ug_genlist.c
@@ -450,15 +450,11 @@ static Evas_Object *_gl_peer_icon_get(void *data, Evas_Object *obj, const char *
break;
}
- if (img_path != NULL) {
- icon = elm_icon_add(obj);
- elm_icon_file_set(icon, img_path, NULL);
- evas_object_size_hint_aspect_set(icon, EVAS_ASPECT_CONTROL_VERTICAL, 1, 1);
- elm_icon_resizable_set(icon, 1, 1);
- evas_object_show(icon);
- } else {
- return NULL;
- }
+ icon = elm_icon_add(obj);
+ elm_icon_file_set(icon, img_path, NULL);
+ evas_object_size_hint_aspect_set(icon, EVAS_ASPECT_CONTROL_VERTICAL, 1, 1);
+ elm_icon_resizable_set(icon, 1, 1);
+ evas_object_show(icon);
}
__WDUG_LOG_FUNC_EXIT__;