return;
}
- if (!client->peer_data_connection_cb) {
- WDC_LOGI("peer_data_connection_cb is NULL!!");
- __WDC_LOG_FUNC_END__;
- return;
- }
-
g_variant_get(parameters, "(ii&s&s)",
&error_code, &connection_state, &peer_mac_address, &peer_dev_name);
g_strlcpy(data_s.mac_address, peer_mac_address, WIFI_DIRECT_MAC_ADDRESS_LEN+1);
g_strlcpy(data_s.device_name, peer_dev_name, WIFI_DIRECT_MAX_DEVICE_NAME_LEN+1);
- client->peer_data_connection_cb(error_code,
- connection_state,
- data_s,
- client->user_data_for_cb_peer_data_connection);
+ if (client->connection_cb) {
+ client->connection_cb(error_code,
+ connection_state,
+ peer_mac_address,
+ client->user_data_for_cb_connection);
+ }
+
+ if (client->peer_data_connection_cb) {
+ client->peer_data_connection_cb(error_code,
+ connection_state,
+ data_s,
+ client->user_data_for_cb_peer_data_connection);
+ }
__WDC_LOG_FUNC_END__;
}