Bug fix
authorCheoleun Moon <chleun.moon@samsung.com>
Mon, 9 Mar 2020 11:11:19 +0000 (20:11 +0900)
committerCheoleun Moon <chleun.moon@samsung.com>
Mon, 9 Mar 2020 11:11:19 +0000 (20:11 +0900)
src/wifi-aware-data-path.c
test/wifi-aware-test.c

index a76a75d..85c996d 100644 (file)
@@ -118,6 +118,8 @@ int _wifi_aware_data_path_handle_create(wifi_aware_session_h session, wifi_aware
        RET_VAL_IF(ndp == NULL, WIFI_AWARE_ERROR_OUT_OF_MEMORY, "Out of memory");
 
        *data_path = (wifi_aware_data_path_h)ndp;
+       ndp->session = session;
+       ndp->peer = peer;
        if (_wifi_aware_session_is_publish_type(session))
                ndp->role = WIFI_AWARE_DATA_PATH_RESPONDER;
        else
index 5813642..026945f 100644 (file)
@@ -869,7 +869,7 @@ void test_open_data_path()
        RET_IF_LOOP_IS_NULL();
 
        __display_peer_list();
-       printf("Select a peer to send message: ");
+       printf("Select a peer to connect: ");
        if (scanf("%d", &peer_id) < 0)
                return;
 
@@ -886,7 +886,7 @@ void test_open_data_path()
        ret = wifi_aware_data_path_set_security(g_ndp, security_type);
        __print_result(ret, "wifi_aware_data_path_set_security");
 
-       if (security_type == WIFI_AWARE_SECURITY_TYPE_PSK) {
+       if (security_type == 1) {
                char key[MAX_PSK_LEN] = {0, };
                printf("Passphrase: ");
                ret = scanf("%s", key);
@@ -896,7 +896,7 @@ void test_open_data_path()
                __print_result(ret, "wifi_aware_data_path_set_psk");
        }
 
-       if (security_type == WIFI_AWARE_SECURITY_TYPE_PMK) {
+       if (security_type == 2) {
                char key[PMK_LEN] = {0, };
                unsigned char pmk[PMK_LEN] = {0, };
                printf("PMK: ");
@@ -910,6 +910,7 @@ void test_open_data_path()
 
        if (g_session_type == 0) {
                int port = -1;
+               printf("Port: ");
                ret = scanf("%d", &port);
                if (ret < 0)
                        return;