DEBUG_SIGNAL(sender, object_path, interface, signal, parameters);
#endif /* TIZEN_DEBUG_DBUS_VALUE */
- if(!g_pd) {
- WDP_LOGE("ws_dbus_plugin_data_s is not created yet");
- return;
- }
+ if (!g_pd) {
+ WDP_LOGE("ws_dbus_plugin_data_s is not created yet");
+ return;
+ }
if (!g_strcmp0(signal,"InterfaceAdded")) {
WDP_LOGD("InterfaceAdded");
if(!event || !event->edata)
return;
- if(!g_pd) {
- WDP_LOGE("ws_dbus_plugin_data_s is not created yet");
- return;
- }
+ if (!g_pd) {
+ WDP_LOGE("ws_dbus_plugin_data_s is not created yet");
+ return;
+ }
wfd_oem_group_data_s *group = (wfd_oem_group_data_s *)event->edata;
#if defined (TIZEN_DEBUG_DBUS_VALUE)
dbus_method_param_s params;
int res = 0;
- if(!g_pd) {
- WDP_LOGE("ws_dbus_plugin_data_s is not created yet");
- return -1;
- }
+ if (!g_pd) {
+ WDP_LOGE("ws_dbus_plugin_data_s is not created yet");
+ return -1;
+ }
g_dbus = g_pd->g_dbus;
if (!g_dbus) {
dbus_method_param_s params;
int res = 0;
- if(!g_pd) {
- WDP_LOGE("ws_dbus_plugin_data_s is not created yet");
- return -1;
- }
+ if (!g_pd) {
+ WDP_LOGE("ws_dbus_plugin_data_s is not created yet");
+ return -1;
+ }
g_dbus = g_pd->g_dbus;
wfd_oem_dev_data_s *edata = NULL;
static char peer_path[DBUS_OBJECT_PATH_MAX] = {'\0',};
- if(!g_pd) {
- WDP_LOGE("ws_dbus_plugin_data_s is not created yet");
- return;
- }
-
edata = (wfd_oem_dev_data_s *) g_try_malloc0(sizeof(wfd_oem_dev_data_s));
if (!edata) {
WDP_LOGF("Failed to allocate memory for event. [%s]",
wfd_oem_event_s event;
static char peer_path[DBUS_OBJECT_PATH_MAX] = {'\0',};
- if(!g_pd) {
- WDP_LOGE("ws_dbus_plugin_data_s is not created yet");
- return;
- }
-
memset(&event, 0x0, sizeof(wfd_oem_event_s));
event.edata_type = WFD_OEM_EDATA_TYPE_NONE;
__WDP_LOG_FUNC_ENTER__;
wfd_oem_event_s event;
- if(!g_pd) {
- WDP_LOGE("ws_dbus_plugin_data_s is not created yet");
- return;
- }
-
memset(&event, 0x0, sizeof(wfd_oem_event_s));
event.edata_type = WFD_OEM_EDATA_TYPE_NONE;
const char *pin = NULL;
char *loc = NULL;
- if(!g_pd) {
- WDP_LOGE("ws_dbus_plugin_data_s is not created yet");
- return;
- }
-
edata = (wfd_oem_dev_data_s *) g_try_malloc0(sizeof(wfd_oem_dev_data_s));
if (!edata) {
WDP_LOGF("Failed to allocate memory for event. [%s]",
const char *pin = NULL;
char *loc = NULL;
- if(!g_pd) {
- WDP_LOGE("ws_dbus_plugin_data_s is not created yet");
- return;
- }
-
edata = (wfd_oem_dev_data_s *) g_try_malloc0(sizeof(wfd_oem_dev_data_s));
if (!edata) {
WDP_LOGF("Failed to allocate memory for event. [%s]",
wfd_oem_dev_data_s *edata = NULL;
static char peer_path[DBUS_OBJECT_PATH_MAX] = {'\0',};
- if(!g_pd) {
- WDP_LOGE("ws_dbus_plugin_data_s is not created yet");
- return;
- }
-
edata = (wfd_oem_dev_data_s *) g_try_malloc0(sizeof(wfd_oem_dev_data_s));
if (!edata) {
WDP_LOGF("Failed to allocate memory for event. [%s]",
wfd_oem_dev_data_s *edata = NULL;
static char peer_path[DBUS_OBJECT_PATH_MAX] = {'\0',};
- if(!g_pd) {
- WDP_LOGE("ws_dbus_plugin_data_s is not created yet");
- return;
- }
-
edata = (wfd_oem_dev_data_s *) g_try_malloc0(sizeof(wfd_oem_dev_data_s));
if (!edata) {
WDP_LOGF("Failed to allocate memory for event. [%s]",
wfd_oem_dev_data_s *edata = NULL;
static char peer_path[DBUS_OBJECT_PATH_MAX] = {'\0',};
- if(!g_pd) {
- WDP_LOGE("ws_dbus_plugin_data_s is not created yet");
- return;
- }
-
edata = (wfd_oem_dev_data_s *) g_try_malloc0(sizeof(wfd_oem_dev_data_s));
if (!edata) {
WDP_LOGF("Failed to allocate memory for event. [%s]",
wfd_oem_dev_data_s *edata = NULL;
static char peer_path[DBUS_OBJECT_PATH_MAX] = {'\0',};
- if(!g_pd) {
- WDP_LOGE("ws_dbus_plugin_data_s is not created yet");
- return;
- }
-
edata = (wfd_oem_dev_data_s *) g_try_malloc0(sizeof(wfd_oem_dev_data_s));
if (!edata) {
WDP_LOGF("Failed to allocate memory for event. [%s]",
int prov_status = 0;
char *loc = NULL;
- if(!g_pd) {
- WDP_LOGE("ws_dbus_plugin_data_s is not created yet");
- return;
- }
-
memset(&event, 0x0, sizeof(wfd_oem_event_s));
event.edata_type = WFD_OEM_EDATA_TYPE_DEVICE;
wfd_oem_event_s event;
wfd_oem_conn_data_s *edata = NULL;
- if(!g_pd) {
- WDP_LOGE("ws_dbus_plugin_data_s is not created yet");
- return;
- }
-
edata = (wfd_oem_conn_data_s*)calloc(1, sizeof(wfd_oem_conn_data_s));
if (!edata) {
WDP_LOGF("Failed to allocate memory for event. [%s]",
int dev_pwd_id = 0;
- if(!g_pd) {
- WDP_LOGE("ws_dbus_plugin_data_s is not created yet");
- return;
- }
-
edata = (wfd_oem_dev_data_s *) g_try_malloc0(sizeof(wfd_oem_dev_data_s));
if (!edata) {
WDP_LOGF("Failed to allocate memory for event. [%s]",
wfd_oem_event_s event;
wfd_oem_invite_data_s *edata = NULL;
- if(!g_pd) {
- WDP_LOGE("ws_dbus_plugin_data_s is not created yet");
- return;
- }
-
edata = (wfd_oem_invite_data_s *) g_try_malloc0(sizeof(wfd_oem_invite_data_s));
if (!edata) {
WDP_LOGF("Failed to allocate memory for event. [%s]",
__WDP_LOG_FUNC_ENTER__;
wfd_oem_event_s event;
- if(!g_pd) {
- WDP_LOGE("ws_dbus_plugin_data_s is not created yet");
- return;
- }
-
memset(&event, 0x0, sizeof(wfd_oem_event_s));
event.event_id = WFD_OEM_EVENT_GROUP_DESTROYED;
GVariantIter *iter = NULL;
wfd_oem_event_s event;
- if(!g_pd) {
- WDP_LOGE("ws_dbus_plugin_data_s is not created yet");
- return;
- }
-
memset(&event, 0x0, sizeof(wfd_oem_event_s));
event.event_id = WFD_OEM_EVENT_SERV_DISC_RESP;
wfd_oem_event_s event;
const char *name = NULL;
- if(!g_pd) {
- WDP_LOGE("ws_dbus_plugin_data_s is not created yet");
- return;
- }
-
memset(&event, 0x0, sizeof(wfd_oem_event_s));
event.event_id = WFD_OEM_EVENT_WPS_FAIL;
__WDP_LOG_FUNC_ENTER__;
wfd_oem_event_s event;
- if(!g_pd) {
- WDP_LOGE("ws_dbus_plugin_data_s is not created yet");
- return;
- }
-
memset(&event, 0x0, sizeof(wfd_oem_event_s));
event.event_id = WFD_OEM_EVENT_WPS_FAIL;
_ws_process_prov_disc_resp_display_pin
},
{
- SUPPLICANT_P2PDEVICE,
+ SUPPLICANT_P2PDEVICE,
"ProvisionDiscoveryRequestEnterPin",
_ws_process_prov_disc_req_enter_pin
},
DEBUG_SIGNAL(sender, object_path, interface, signal, parameters);
#endif /* TIZEN_DEBUG_DBUS_VALUE */
+ if (!g_pd) {
+ WDP_LOGE("ws_dbus_plugin_data_s is not created yet");
+ return;
+ }
+
for (i = 0; ws_p2pdevice_signal_map[i].member != NULL; i++) {
if (!g_strcmp0(signal, ws_p2pdevice_signal_map[i].member) &&
ws_p2pdevice_signal_map[i].function != NULL)
DEBUG_SIGNAL(sender, object_path, interface, signal, parameters);
#endif /* TIZEN_DEBUG_DBUS_VALUE */
- if(!g_pd) {
- WDP_LOGE("ws_dbus_plugin_data_s is not created yet");
- return;
- }
+ if (!g_pd) {
+ WDP_LOGE("ws_dbus_plugin_data_s is not created yet");
+ return;
+ }
- if(!g_strcmp0(signal,"PeerJoined")){
+ if (!g_strcmp0(signal,"PeerJoined")) {
- wfd_oem_event_s event;
- wfd_oem_dev_data_s *edata = NULL;
+ wfd_oem_event_s event;
+ wfd_oem_dev_data_s *edata = NULL;
- static char peer_path[DBUS_OBJECT_PATH_MAX] = {'\0',};
+ static char peer_path[DBUS_OBJECT_PATH_MAX] = {'\0',};
- edata = (wfd_oem_dev_data_s *) g_try_malloc0(sizeof(wfd_oem_dev_data_s));
- if (!edata) {
- WDP_LOGF("Failed to allocate memory for event. [%s]",
- strerror(errno));
- __WDP_LOG_FUNC_EXIT__;
- return;
- }
- memset(&event, 0x0, sizeof(wfd_oem_event_s));
+ edata = (wfd_oem_dev_data_s *) g_try_malloc0(sizeof(wfd_oem_dev_data_s));
+ if (!edata) {
+ WDP_LOGF("Failed to allocate memory for event. [%s]",
+ strerror(errno));
+ __WDP_LOG_FUNC_EXIT__;
+ return;
+ }
+ memset(&event, 0x0, sizeof(wfd_oem_event_s));
- event.edata = (void*) edata;
- event.edata_type = WFD_OEM_EDATA_TYPE_DEVICE;
- event.event_id = WFD_OEM_EVENT_STA_CONNECTED;
+ event.edata = (void*) edata;
+ event.edata_type = WFD_OEM_EDATA_TYPE_DEVICE;
+ event.event_id = WFD_OEM_EVENT_STA_CONNECTED;
- __ws_parse_peer_joined(peer_path, event.dev_addr, event.ip_addr_peer, parameters);
+ __ws_parse_peer_joined(peer_path, event.dev_addr, event.ip_addr_peer, parameters);
- dbus_property_get_all(peer_path, g_pd->g_dbus, SUPPLICANT_P2P_PEER,
- __ws_peer_property, event.edata);
+ dbus_property_get_all(peer_path, g_pd->g_dbus, SUPPLICANT_P2P_PEER,
+ __ws_peer_property, event.edata);
- g_pd->callback(g_pd->user_data, &event);
- g_free(edata);
+ g_pd->callback(g_pd->user_data, &event);
+ g_free(edata);
} else if (!g_strcmp0(signal,"PeerDisconnected")) {
static char interface_path[DBUS_OBJECT_PATH_MAX] = {'\0',};
const char *path = NULL;
- if(!g_pd) {
- WDP_LOGE("ws_dbus_plugin_data_s is not created yet");
- return;
- }
+ if (!g_pd) {
+ WDP_LOGE("ws_dbus_plugin_data_s is not created yet");
+ return;
+ }
pd_data = (ws_dbus_plugin_data_s *)g_pd;
int res = 0;
- if(!g_pd) {
- WDP_LOGE("ws_dbus_plugin_data_s is not created yet");
- return -1;
- }
+ if (!g_pd) {
+ WDP_LOGE("ws_dbus_plugin_data_s is not created yet");
+ return -1;
+ }
g_dbus = g_pd->g_dbus;
if (!g_dbus) {
dbus_method_param_s params;
int res = 0;
- if(!g_pd) {
- WDP_LOGE("ws_dbus_plugin_data_s is not created yet");
- return -1;
- }
+ if (!g_pd) {
+ WDP_LOGE("ws_dbus_plugin_data_s is not created yet");
+ return -1;
+ }
g_dbus = g_pd->g_dbus;
if (!g_dbus) {
static char interface_path[DBUS_OBJECT_PATH_MAX] = {'\0',};
int res = 0;
- if(!g_pd) {
- WDP_LOGE("ws_dbus_plugin_data_s is not created yet");
- return;
- }
+ if (!g_pd) {
+ WDP_LOGE("ws_dbus_plugin_data_s is not created yet");
+ return;
+ }
g_dbus = g_pd->g_dbus;
if (!g_dbus) {
GError *error = NULL;
int res = 0;
- if(!g_pd) {
- WDP_LOGE("ws_dbus_plugin_data_s is not created yet");
- return -1;
- }
+ if (!g_pd) {
+ WDP_LOGE("ws_dbus_plugin_data_s is not created yet");
+ return -1;
+ }
conn = g_bus_get_sync(G_BUS_TYPE_SYSTEM, NULL, &error);
int i = 0;
int res = 0;
- if(!g_pd) {
+ if (!g_pd) {
WDP_LOGE("ws_dbus_plugin_data_s is not created yet");
return -1;
}
dbus_method_param_s params;
int res = 0;
- if(!g_pd) {
+ if (!g_pd) {
WDP_LOGE("ws_dbus_plugin_data_s is not created yet");
return -1;
}
int res = 0;
int retry_count = 0;
- if(!g_pd) {
- WDP_LOGE("ws_dbus_plugin_data_s is not created yet");
- return -1;
- }
+ if (!g_pd) {
+ WDP_LOGE("ws_dbus_plugin_data_s is not created yet");
+ return -1;
+ }
res = __ws_p2p_supplicant_start();
if (res < 0) {
__WDP_LOG_FUNC_ENTER__;
int res = 0;
- if(!g_pd) {
- WDP_LOGE("ws_dbus_plugin_data_s is not created yet");
- return -1;
- }
+ if (!g_pd) {
+ WDP_LOGE("ws_dbus_plugin_data_s is not created yet");
+ return -1;
+ }
if (!g_pd->activated) {
WDP_LOGE("Wi-Fi Direct is not activated");
return -1;
}
- if(!g_pd) {
+ if (!g_pd) {
WDP_LOGE("ws_dbus_plugin_data_s is not created yet");
return -1;
}
dbus_method_param_s params;
int res = 0;
- if(!g_pd) {
+ if (!g_pd) {
WDP_LOGE("ws_dbus_plugin_data_s is not created yet");
return -1;
}
dbus_method_param_s params;
int res = 0;
- if(!g_pd) {
+ if (!g_pd) {
WDP_LOGE("ws_dbus_plugin_data_s is not created yet");
return -1;
}
return -1;
}
- if(!g_pd) {
+ if (!g_pd) {
WDP_LOGE("ws_dbus_plugin_data_s is not created yet");
return -1;
}
return -1;
}
- if(!g_pd) {
+ if (!g_pd) {
WDP_LOGE("ws_dbus_plugin_data_s is not created yet");
return -1;
}
return -1;
}
- if(!g_pd) {
+ if (!g_pd) {
WDP_LOGE("ws_dbus_plugin_data_s is not created yet");
return -1;
}
return -1;
}
- if(!g_pd) {
+ if (!g_pd) {
WDP_LOGE("ws_dbus_plugin_data_s is not created yet");
return -1;
}
return -1;
}
- if(!g_pd) {
+ if (!g_pd) {
WDP_LOGE("ws_dbus_plugin_data_s is not created yet");
return -1;
}
char n_pin[9] = {0,};
int res = 0;
- if(!g_pd) {
+ if (!g_pd) {
WDP_LOGE("ws_dbus_plugin_data_s is not created yet");
return -1;
}
ws_dbus_plugin_data_s * pd_data;
const char *path = NULL;
- if(!g_pd) {
+ if (!g_pd) {
WDP_LOGE("ws_dbus_plugin_data_s is not created yet");
return;
}
dbus_method_param_s params;
int res = 0;
- if(!g_pd) {
+ if (!g_pd) {
WDP_LOGE("ws_dbus_plugin_data_s is not created yet");
return -1;
}
return -1;
}
- if(!g_pd) {
+ if (!g_pd) {
WDP_LOGE("ws_dbus_plugin_data_s is not created yet");
return -1;
}
return -1;
}
- if(!g_pd) {
+ if (!g_pd) {
WDP_LOGE("ws_dbus_plugin_data_s is not created yet");
return -1;
}
int i = 0;
int res = 0;
- if(!g_pd) {
+ if (!g_pd) {
WDP_LOGE("ws_dbus_plugin_data_s is not created yet");
return -1;
}
return -1;
}
- if(!g_pd) {
+ if (!g_pd) {
WDP_LOGE("ws_dbus_plugin_data_s is not created yet");
return -1;
}
return -1;
}
- if(!g_pd) {
+ if (!g_pd) {
WDP_LOGE("ws_dbus_plugin_data_s is not created yet");
return -1;
}
dbus_method_param_s params;
int res = 0;
- if(!g_pd) {
+ if (!g_pd) {
WDP_LOGE("ws_dbus_plugin_data_s is not created yet");
return -1;
}
dbus_method_param_s params;
int res = 0;
- if(!g_pd) {
+ if (!g_pd) {
WDP_LOGE("ws_dbus_plugin_data_s is not created yet");
return -1;
}
wfd_oem_persistent_group_s *wfd_persistent_groups = NULL;
int i, cnt = 0;
- if(!g_pd) {
+ if (!g_pd) {
WDP_LOGE("ws_dbus_plugin_data_s is not created yet");
return -1;
}
int i, cnt = 0;
int res = 0;
- if(!g_pd) {
+ if (!g_pd) {
WDP_LOGE("ws_dbus_plugin_data_s is not created yet");
return -1;
}
dbus_method_param_s params;
int res = 0;
- if(!g_pd) {
+ if (!g_pd) {
WDP_LOGE("ws_dbus_plugin_data_s is not created yet");
return -1;
}
int i = 0;
int res = 0;
- if(!g_pd) {
+ if (!g_pd) {
WDP_LOGE("ws_dbus_plugin_data_s is not created yet");
return -1;
}
int res = 0;
- if(!g_pd) {
+ if (!g_pd) {
WDP_LOGE("ws_dbus_plugin_data_s is not created yet");
return -1;
}
dbus_method_param_s params;
int res = 0;
- if(!g_pd) {
+ if (!g_pd) {
WDP_LOGE("ws_dbus_plugin_data_s is not created yet");
return -1;
}
dbus_method_param_s params;
int res = 0;
- if(!g_pd) {
+ if (!g_pd) {
WDP_LOGE("ws_dbus_plugin_data_s is not created yet");
return -1;
}
dbus_method_param_s params;
int res = 0;
- if(!g_pd) {
+ if (!g_pd) {
WDP_LOGE("ws_dbus_plugin_data_s is not created yet");
return -1;
}