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
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;
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);
__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: ");
if (g_session_type == 0) {
int port = -1;
+ printf("Port: ");
ret = scanf("%d", &port);
if (ret < 0)
return;