WIFI_AWARE_DISCOVERY_INTERFACE,
"MessageReceived",
},
- [DATA_PATH_CONFIRMED_SIGNAL] = {
+ [DATA_PATH_OPEN_RESULT] = {
WIFI_AWARE_DISCOVERY_INTERFACE,
- "DataPathConfirmed",
+ "DataPathOpenResult",
},
};
return g_variant_new("(iqusii)", client_id, pub_sub_id, peer_id, service_name, role, port);
}
-static GVariant *__append_param_psk(GVariant *params, const char *psk)
+static GVariant *__create_ndp_open_request_psk_param(int client_id, uint16_t pub_sub_id,
+ unsigned int peer_id, const char *service_name,
+ wifi_aware_data_path_role_e role, int port, const char *psk)
{
- return g_variant_new("vs", params, psk);
+ return g_variant_new("(iqusiis)", client_id, pub_sub_id, peer_id,
+ service_name, role, port, psk);
}
-static GVariant *__append_param_pmk(GVariant *params, const unsigned char *pmk, size_t pmk_len)
+static GVariant *__create_ndp_open_request_pmk_param(int client_id, uint16_t pub_sub_id,
+ unsigned int peer_id, const char *service_name,
+ wifi_aware_data_path_role_e role, int port, const unsigned char *pmk, size_t pmk_len)
{
- return g_variant_new("uvv", pmk_len, params, __pack_byte_array(pmk, pmk_len));
+ return g_variant_new("(iqusiiuv)", client_id, pub_sub_id, peer_id,
+ service_name, role, port, pmk_len, __pack_byte_array(pmk, pmk_len));
}
-
static GVariant *__create_ndp_close_request_param(int client_id, unsigned int ndp_id,
uint16_t pub_sub_id, unsigned int peer_id)
{
- return g_variant_new("iquu", client_id, pub_sub_id, peer_id, ndp_id);
+ return g_variant_new("(iquu)", client_id, pub_sub_id, peer_id, ndp_id);
}
int wifi_aware_gdbus_enable(wifi_aware_enable_request_s *req, GAsyncReadyCallback cb)
{
__WIFI_AWARE_FUNC_ENTER__;
GVariant *params = NULL;
- GVariant *params_psk = NULL;
GVariant *reply = NULL;
int ret = WIFI_AWARE_ERROR_NONE;
- params = __create_ndp_open_request_param(client_id, pub_sub_id, peer_id,
- service_name, role, port);
- params_psk = __append_param_psk(params, psk);
- g_variant_unref(params);
+ params = __create_ndp_open_request_psk_param(client_id, pub_sub_id, peer_id,
+ service_name, role, port, psk);
WIFI_AWARE_LOGD("created parameters");
- DBUS_DEBUG_VARIANT(params_psk);
+ DBUS_DEBUG_VARIANT(params);
ret = __wifi_aware_dbus_method_call_sync(
WIFI_AWARE_DISCOVERY_INTERFACE,
WIFI_AWARE_DISCOVERY_PATH,
- "OpenDataPathPsk", params_psk, &reply);
+ "OpenDataPathPsk", params, &reply);
RET_VAL_IF(ret != WIFI_AWARE_ERROR_NONE, ret, "Failed to open data path");
{
__WIFI_AWARE_FUNC_ENTER__;
GVariant *params = NULL;
- GVariant *params_pmk = NULL;
GVariant *reply = NULL;
int ret = WIFI_AWARE_ERROR_NONE;
- params = __create_ndp_open_request_param(client_id, pub_sub_id, peer_id,
- service_name, role, port);
- params_pmk = __append_param_pmk(params, pmk, pmk_len);
- g_variant_unref(params);
+ params = __create_ndp_open_request_pmk_param(client_id, pub_sub_id, peer_id,
+ service_name, role, port, pmk, pmk_len);
WIFI_AWARE_LOGD("created parameters");
- DBUS_DEBUG_VARIANT(params_pmk);
+ DBUS_DEBUG_VARIANT(params);
ret = __wifi_aware_dbus_method_call_sync(
WIFI_AWARE_DISCOVERY_INTERFACE,
WIFI_AWARE_DISCOVERY_PATH,
- "OpenDataPathPmk", params_pmk, &reply);
+ "OpenDataPathPmk", params, &reply);
RET_VAL_IF(ret != WIFI_AWARE_ERROR_NONE, ret, "Failed to open data path");