Merge branch 'master' into tizen_2.1 2.1b_release accepted/tizen_2.1/20130425.023138 submit/tizen_2.1/20130424.223800
authorKim Gibyoung <lastkgb.kim@samsung.com>
Tue, 23 Apr 2013 16:39:20 +0000 (01:39 +0900)
committerKim Gibyoung <lastkgb.kim@samsung.com>
Tue, 23 Apr 2013 16:39:28 +0000 (01:39 +0900)
Change-Id: I9eed66435404d35ccfd4d61f40072f527f1a063d

debian/changelog
packaging/libug-setting-wifidirect-efl.spec
popup-wifidirect/CMakeLists.txt
popup-wifidirect/src/wfd-app-client.c
popup-wifidirect/src/wfd-app-popup-view.c
ug-wifidirect/src/wfd_client.c
ug-wifidirect/src/wfd_ug_genlist.c
ugapp-wifidirect/CMakeLists.txt

index d2cb5ae..017beab 100755 (executable)
@@ -1,3 +1,11 @@
+ug-setting-wifidirect-efl (1.0.16) precise; urgency=low
+
+  * Prevent issue fixed
+  * Git: rsa/apps/home/ug-wifi-direct
+  * Tag: libug-setting-wifidirect-efl_1.0.16
+
+ -- Gibyoung Kim <laskgb.kim@samsung.com>  Mon, 23 Apr 2013 23:04:05 +0900
+
 ug-setting-wifidirect-efl (1.0.15) precise; urgency=low
 
   * License file changed
index 8abd8cf..ae3fe11 100755 (executable)
@@ -3,7 +3,7 @@
 
 Name:       libug-setting-wifidirect-efl
 Summary:    Wi-Fi Direct setting UI gadget 
-Version:    1.0.15
+Version:    1.0.16
 Release:    1
 Group:      TO_BE_FILLED
 License:    Flora License
index d2654ec..859329b 100755 (executable)
@@ -12,7 +12,6 @@ SET(IMGDIR "${RESDIR}/images")
 SET(SRCS
        src/wfd-app-main.c
        src/wfd-app-client.c
-       src/wfd-app-util.c
        src/wfd-app-popup-view.c
 )
 
index 94803f6..72595ed 100755 (executable)
@@ -168,9 +168,9 @@ void _add_wfd_peers_connected_notification(void *user_data)
        res = notification_set_execute_option(ad->noti, NOTIFICATION_EXECUTE_TYPE_SINGLE_LAUNCH, /*Button Text*/NULL, NULL, b);
        if (res != NOTIFICATION_ERROR_NONE) {
                WDPOP_LOGD( "Failed to notification_set_execute_option. [%d]", res);
+               bundle_free(b);
                return;
        }
-
        bundle_free(b);
 
        /* set display application list */
@@ -241,9 +241,9 @@ void _add_wfd_turn_off_notification(void *user_data)
        res = notification_set_execute_option(ad->noti, NOTIFICATION_EXECUTE_TYPE_SINGLE_LAUNCH, /*Button Text*/NULL, NULL, b);
        if (res != NOTIFICATION_ERROR_NONE) {
                WDPOP_LOGD( "Failed to notification_set_execute_option. [%d]", res);
+               bundle_free(b);
                return;
        }
-
        bundle_free(b);
 
        /* set display application list */
@@ -396,6 +396,7 @@ bool _wfd_app_discoverd_peer_cb(wifi_direct_discovered_peer_info_s *peer, void *
        if (NULL != peer->mac_address) {
                WDPOP_LOGD( "discovered peer mac[%s]\n", peer->mac_address);
                strncpy(ad->discovered_peers[ad->discovered_peer_count].mac_address, peer->mac_address, 18);
+               ad->discovered_peers[ad->discovered_peer_count].mac_address[17] = '\0';
        } else {
                WDPOP_LOGD( "peer's mac is NULL\n");
        }
@@ -567,6 +568,7 @@ void _cb_connection(int error_code, wifi_direct_connection_state_e connection_st
                        }
 
                        strncpy(ad->pin_number, pin, 64);
+                       ad->pin_number[63] = '\0';
                        free(pin);
                        pin = NULL;
 
@@ -800,12 +802,7 @@ int init_wfd_popup_client(wfd_appdata_t *ad)
        }
 
        __WDPOP_LOG_FUNC_EXIT__;
-
-       if (ret == WIFI_DIRECT_ERROR_NONE) {
-               return TRUE;
-       } else {
-               return FALSE;
-       }
+       return TRUE;
 }
 
 /**
index a80528e..e9ac242 100755 (executable)
@@ -128,6 +128,7 @@ static void __popup_resp_cb(void *data, Evas_Object * obj, void *event_info)
                }
 
                strncpy(ad->pin_number, pin, 64);
+               ad->pin_number[63] = '\0';
                free(pin);
                pin = NULL;
                WDPOP_LOGD( "button ok: pin [%s]", ad->pin_number);
@@ -377,7 +378,9 @@ static void _smart_ime_cb(void *data, Evas_Object * obj, void *event_info)
        const char *txt = elm_entry_markup_to_utf8(elm_entry_entry_get((const Evas_Object *) imf_context));
        if (NULL != txt) {
                WDPOP_LOGD( "* text [%s], len=[%d]", txt, strlen(txt));
-               strncpy(ad->pin_number, txt, sizeof(ad->pin_number));
+               strncpy(ad->pin_number, txt, 64);
+               ad->pin_number[63] = '\0';
+               free(txt);
        } else {
                WDPOP_LOGD( "Err!");
        }
index f1f1e93..e46ba00 100755 (executable)
@@ -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);
index 64474ce..bff197c 100755 (executable)
@@ -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__;
index 7c4b390..a1dff23 100755 (executable)
@@ -11,7 +11,6 @@ SET(IMGDIR "${RESDIR}/images")
 
 SET(SRCS
        src/wfd-ugapp-main.c
-       src/wfd-ugapp-util.c
 )
 
 INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/include)