if (security_type != TETHERING_WIFI_SECURITY_TYPE_NONE &&
security_type != TETHERING_WIFI_SECURITY_TYPE_WPA2_PSK &&
security_type != TETHERING_WIFI_SECURITY_TYPE_WPS) {
- ERR("Invalid param\n");
+ ERR("Invalid param\n"); //LCOV_EXCL_LINE
return TETHERING_ERROR_INVALID_PARAMETER;
}
if (vconf_set_int(VCONFKEY_MOBILE_HOTSPOT_SECURITY, security_type) < 0) {
- ERR("vconf_set_int is failed\n");
+ ERR("vconf_set_int is failed\n"); //LCOV_EXCL_LINE
return TETHERING_ERROR_OPERATION_FAILED;
}
static tethering_error_e __get_security_type(tethering_wifi_security_type_e *security_type)
{
if (security_type == NULL) {
- ERR("Invalid param\n");
+ ERR("Invalid param\n"); //LCOV_EXCL_LINE
return TETHERING_ERROR_INVALID_PARAMETER;
}
if (vconf_get_int(VCONFKEY_MOBILE_HOTSPOT_SECURITY,
(int *)security_type) < 0) {
- ERR("vconf_get_int is failed\n");
+ ERR("vconf_get_int is failed\n"); //LCOV_EXCL_LINE
return TETHERING_ERROR_OPERATION_FAILED;
}
static tethering_error_e __set_visible(const bool visible)
{
if (vconf_set_int(VCONFKEY_MOBILE_HOTSPOT_HIDE, visible ? 0 : 1) < 0) {
- ERR("vconf_set_int is failed\n");
+ ERR("vconf_set_int is failed\n"); //LCOV_EXCL_LINE
return TETHERING_ERROR_OPERATION_FAILED;
}
static tethering_error_e __get_visible(bool *visible)
{
if (visible == NULL) {
- ERR("Invalid param\n");
+ ERR("Invalid param\n"); //LCOV_EXCL_LINE
return TETHERING_ERROR_INVALID_PARAMETER;
}
int hide = 0;
if (vconf_get_int(VCONFKEY_MOBILE_HOTSPOT_HIDE, &hide) < 0) {
- ERR("vconf_get_int is failed\n");
+ ERR("vconf_get_int is failed\n"); //LCOV_EXCL_LINE
return TETHERING_ERROR_OPERATION_FAILED;
}
err = TETHERING_ERROR_INVALID_PARAMETER;
break;
+ //LCOV_EXCL_START
case MOBILE_AP_ERROR_ALREADY_ENABLED:
err = TETHERING_ERROR_OPERATION_FAILED;
break;
err = TETHERING_ERROR_OPERATION_FAILED;
break;
- //LCOV_EXCL_START
case MOBILE_AP_ERROR_NOT_PERMITTED:
err = TETHERING_ERROR_NOT_PERMITTED;
break;
g_free(name);
DBG("-\n");
}
-//LCOV_EXCL_STOP
-//LCOV_EXCL_START
static void __handle_net_closed(GDBusConnection *connection, const gchar *sender_name,
const gchar *object_path, const gchar *interface_name, const gchar *signal_name,
GVariant *parameters, gpointer user_data)
else if (g_strcmp0(buf, TETHERING_WIFI_SECURITY_TYPE_WPS_STR) == 0)
security_type = TETHERING_WIFI_SECURITY_TYPE_WPS;
else {
- SERR("Unknown type : %s\n", buf);
+ SERR("Unknown type : %s\n", buf); //LCOV_EXCL_LINE
g_free(buf);
return;
}
const gchar *object_path, const gchar *interface_name, const gchar *signal_name,
GVariant *parameters, gpointer user_data)
{
- DBG("+\n");
+ DBG("+\n"); //LCOV_EXCL_LINE
_retm_if(user_data == NULL, "parameter(user_data) is NULL\n");
__tethering_h *th = (__tethering_h *)user_data;
scb = th->ssid_visibility_changed_cb;
if (scb == NULL) {
- DBG("-\n");
+ DBG("-\n"); //LCOV_EXCL_LINE
return;
}
g_variant_get(parameters, "(s)", &buf);
scb(visible, data);
g_free(buf);
- DBG("-\n");
+ DBG("-\n"); //LCOV_EXCL_LINE
}
static void __handle_passphrase_changed(GDBusConnection *connection, const gchar *sender_name,
const gchar *object_path, const gchar *interface_name, const gchar *signal_name,
GVariant *parameters, gpointer user_data)
{
- DBG("+\n");
+ DBG("+\n"); //LCOV_EXCL_LINE
_retm_if(user_data == NULL, "parameter(user_data) is NULL\n");
__tethering_h *th = (__tethering_h *)user_data;
data = th->passphrase_user_data;
pcb(data);
- DBG("-\n");
+ DBG("-\n"); //LCOV_EXCL_LINE
}
static void __wifi_enabled_cfm_cb(GObject *source_object, GAsyncResult *res,
gpointer user_data)
{
- INFO("+\n");
+ INFO("+\n"); //LCOV_EXCL_LINE
_retm_if(user_data == NULL, "parameter(user_data) is NULL\n");
GError *g_error = NULL;
}
retry = 0;
- INFO("cfm event : wifi tethering enable info : %d\n", error);
+ INFO("cfm event : wifi tethering enable info : %d\n", error); //LCOV_EXCL_LINE
sigs[E_SIGNAL_WIFI_TETHER_ON].sig_id = g_dbus_connection_signal_subscribe(th->client_bus,
NULL, TETHERING_SERVICE_INTERFACE, sigs[E_SIGNAL_WIFI_TETHER_ON].name,
sigs[E_SIGNAL_WIFI_TETHER_ON].cb, (gpointer)th, NULL);
if (!ecb) {
- INFO("-\n");
+ INFO("-\n"); //LCOV_EXCL_LINE
return;
}
ecb(error, TETHERING_TYPE_WIFI, true, data);
g_variant_unref(g_var);
- INFO("-\n");
+ INFO("-\n"); //LCOV_EXCL_LINE
}
static void __bt_enabled_cfm_cb(GObject *source_object, GAsyncResult *res,
gpointer user_data)
{
- DBG("+\n");
+ DBG("+\n"); //LCOV_EXCL_LINE
_retm_if(user_data == NULL, "parameter(user_data) is NULL\n");
GError *g_error = NULL;
GVariant *g_var;
sigs[E_SIGNAL_BT_TETHER_ON].cb, (gpointer)th, NULL);
if (!ecb) {
- DBG("-\n");
+ DBG("-\n"); //LCOV_EXCL_LINE
return;
}
ecb(error, TETHERING_TYPE_USB, true, data);
DBG("-\n");
}
-//LCOV_EXCL_STOP
static void __p2p_enabled_cfm_cb(GObject *source_object, GAsyncResult *res,
gpointer user_data)
ecb(error, TETHERING_TYPE_P2P, true, data);
DBG("-\n");
}
+//LCOV_EXCL_STOP
static void __disabled_cfm_cb(GObject *source_object, GAsyncResult *res,
gpointer user_data)
{
- INFO("+\n");
+ INFO("+\n"); //LCOV_EXCL_LINE
_retm_if(user_data == NULL, "parameter(user_data) is NULL\n");
GError *g_error = NULL;
if (dcb)
dcb(error, type, code, data);
break;
- //LCOV_EXCL_STOP
case MOBILE_AP_DISABLE_P2P_TETHERING_CFM:
type = TETHERING_TYPE_P2P;
default:
ERR("Invalid event\n");
break;
+ //LCOV_EXCL_STOP
}
- INFO("-\n");
+ INFO("-\n"); //LCOV_EXCL_LINE
}
static void __get_data_usage_cb(GObject *source_object, GAsyncResult *res,
//LCOV_EXCL_STOP
}
if (th->data_usage_cb == NULL) {
- ERR("There is no data_usage_cb\n");
+ ERR("There is no data_usage_cb\n"); //LCOV_EXCL_LINE
return;
}
if (flag) {
g_var = g_dbus_proxy_call_finish(th->client_bus_proxy, res, &g_error);
if (g_error) {
- ERR("DBus fail [%s]\n", g_error->message);
+ ERR("DBus fail [%s]\n", g_error->message); //LCOV_EXCL_LINE
if (g_error->code == G_DBUS_ERROR_ACCESS_DENIED)
tethering_error = TETHERING_ERROR_PERMISSION_DENIED;
else
g_strlcpy(buf, TETHERING_BT_IF, len);
break;
+ //LCOV_EXCL_START
default:
ERR("Not supported type : %d\n", type);
return false;
+ //LCOV_EXCL_STOP
}
return true;
}
_retvm_if(buf == NULL, false, "parameter(buf) is NULL\n");
switch (type) {
+ //LCOV_EXCL_START
case TETHERING_TYPE_USB:
g_strlcpy(buf, TETHERING_USB_GATEWAY, len);
break;
-
+ //LCOV_EXCL_STOP
case TETHERING_TYPE_WIFI:
g_strlcpy(buf, TETHERING_WIFI_GATEWAY, len);
break;
case TETHERING_TYPE_BT:
g_strlcpy(buf, TETHERING_BT_GATEWAY, len);
break;
-
+ //LCOV_EXCL_START
default:
ERR("Not supported type : %d\n", type);
return false;
+ //LCOV_EXCL_STOP
}
return true;
}
char *ptr = NULL;
if (th == NULL || set == NULL) {
- ERR("null parameter\n-\n");
+ ERR("null parameter\n-\n"); //LCOV_EXCL_LINE
return TETHERING_ERROR_INVALID_PARAMETER;
}
static bool __check_precondition(tethering_type_e type)
{
- int dnet_state = 0;
+ int dnet_status = 0;
int cellular_state = 0;
- int wifi_state = 0;
/* data network through cellular */
vconf_get_int(VCONFKEY_NETWORK_CELLULAR_STATE, &cellular_state);
return TRUE;
}
-#ifdef TIZEN_TV_EXT
- /* data network through ethernet */
- vconf_get_int(VCONFKEY_NETWORK_STATUS, &dnet_state);
- if (dnet_state == VCONFKEY_NETWORK_ETHERNET) {
- INFO("Data Network is connected");
+ /* data network status */
+ vconf_get_int(VCONFKEY_NETWORK_STATUS, &dnet_status);
+ if ((dnet_status == VCONFKEY_NETWORK_WIFI
+ && type != TETHERING_TYPE_WIFI)
+ || dnet_status == VCONFKEY_NETWORK_ETHERNET)
return TRUE;
- }
-#else
- vconf_get_int(VCONFKEY_DNET_STATE, &dnet_state);
- if (dnet_state > VCONFKEY_DNET_OFF) {
- INFO("Data Network is connected");
- return TRUE;
- }
-#endif/*TIZEN_TV_EXT*/
-
- /* data network through wifi */
- if (type != TETHERING_TYPE_WIFI) {
- vconf_get_int(VCONFKEY_WIFI_STATE, &wifi_state);
- if (wifi_state > VCONFKEY_WIFI_UNCONNECTED) {
- INFO("Wi-Fi is connected!");
- return TRUE;
- }
- }
ERR("Network is not available!");
return FALSE;
if (__generate_initial_passphrase(th->passphrase,
sizeof(th->passphrase)) == 0) {
- ERR("random passphrase generation failed\n"); //LCOV_EXCL_LINE
+ //LCOV_EXCL_START
+ ERR("random passphrase generation failed\n");
free(th);
return TETHERING_ERROR_OPERATION_FAILED;
+ //LCOV_EXCL_STOP
}
if (__get_common_ssid(ssid, sizeof(ssid)) != TETHERING_ERROR_NONE) {
- ERR("common ssid get failed\n"); //LCOV_EXCL_LINE
+ //LCOV_EXCL_START
+ ERR("common ssid get failed\n");
free(th);
return TETHERING_ERROR_OPERATION_FAILED;
+ //LCOV_EXCL_STOP
}
#if !GLIB_CHECK_VERSION(2, 36, 0)
INFO("Tethering Handle : 0x%X\n", th);
__disconnect_signals(tethering);
+ _tethering_remove_handle(th);
if (th->ssid)
free(th->ssid);
g_object_unref(th->client_bus);
memset(th, 0x00, sizeof(__tethering_h));
- _tethering_remove_handle(th);
free(th);
INFO("-\n");
ret = __prepare_wifi_settings(tethering, &set);
if (ret != TETHERING_ERROR_NONE) {
+ //LCOV_EXCL_START
ERR("softap settings initialization failed\n");
DBG("-\n");
return TETHERING_ERROR_OPERATION_FAILED;
+ //LCOV_EXCL_STOP
}
g_dbus_connection_signal_unsubscribe(connection,
sigs[E_SIGNAL_WIFI_TETHER_ON].sig_id);
break;
+ //LCOV_EXCL_START
case TETHERING_TYPE_P2P: {
_softap_settings_t p2p_set = {"", "", "", 0, false};
ret = __prepare_wifi_settings(tethering, &p2p_set);
G_DBUS_CALL_FLAGS_NONE, -1, th->cancellable,
(GAsyncReadyCallback) __bt_enabled_cfm_cb, (gpointer)tethering);
break;
- //LCOV_EXCL_STOP
}
default:
ERR("Unknown type : %d\n", type);
DBG("-\n");
return TETHERING_ERROR_INVALID_PARAMETER;
}
+ //LCOV_EXCL_STOP
g_dbus_proxy_set_default_timeout(proxy, DBUS_TIMEOUT_USE_DEFAULT);
INFO("-\n");
}
switch (type) {
- //LCOV_EXCL_START
case TETHERING_TYPE_WIFI: {
_softap_settings_t set = {"", "", "", 0, false, false, 0, 0};
GDBusConnection *connection = th->client_bus;
switch (type) {
+ //LCOV_EXCL_START
case TETHERING_TYPE_USB:
g_dbus_connection_signal_unsubscribe(connection,
sigs[E_SIGNAL_USB_TETHER_OFF].sig_id);
(GAsyncReadyCallback) __disabled_cfm_cb, (gpointer)tethering);
break;
+ //LCOV_EXCL_STOP
case TETHERING_TYPE_WIFI:
(GAsyncReadyCallback) __disabled_cfm_cb, (gpointer)tethering);
break;
+ //LCOV_EXCL_START
case TETHERING_TYPE_P2P:
g_dbus_proxy_call(proxy, "disable_p2p_tethering",
NULL, G_DBUS_CALL_FLAGS_NONE, -1, th->cancellable,
ERR("Not supported tethering type [%d]\n", type);
DBG("-\n");
return TETHERING_ERROR_INVALID_PARAMETER;
+ //LCOV_EXCL_STOP
}
INFO("-\n");
return TETHERING_ERROR_NONE;
API int tethering_get_mac_address(tethering_h tethering, tethering_type_e type, char **mac_address)
{
CHECK_FEATURE_SUPPORTED(TETHERING_FEATURE);
- if (type == TETHERING_TYPE_USB) CHECK_FEATURE_SUPPORTED(TETHERING_USB_FEATURE);
+ if (type == TETHERING_TYPE_USB) CHECK_FEATURE_SUPPORTED(TETHERING_USB_FEATURE); //LCOV_EXCL_LINE
else if (type == TETHERING_TYPE_WIFI) CHECK_FEATURE_SUPPORTED(TETHERING_WIFI_FEATURE);
- else if (type == TETHERING_TYPE_BT) CHECK_FEATURE_SUPPORTED(TETHERING_BT_FEATURE);
+ else if (type == TETHERING_TYPE_BT) CHECK_FEATURE_SUPPORTED(TETHERING_BT_FEATURE); //LCOV_EXCL_LINE
_retvm_if(tethering_is_enabled(tethering, type) == false,
TETHERING_ERROR_NOT_ENABLED,
_retvm_if(s < 0, TETHERING_ERROR_OPERATION_FAILED,
"getting socket is failed\n");
if (ioctl(s, SIOCGIFHWADDR, &ifr) < 0) {
+ //LCOV_EXCL_START
ERR("getting mac is failed\n");
close(s);
return TETHERING_ERROR_OPERATION_FAILED;
+ //LCOV_EXCL_STOP
}
close(s);
API int tethering_get_ip_address(tethering_h tethering, tethering_type_e type, tethering_address_family_e address_family, char **ip_address)
{
CHECK_FEATURE_SUPPORTED(TETHERING_FEATURE);
- if (type == TETHERING_TYPE_USB) CHECK_FEATURE_SUPPORTED(TETHERING_USB_FEATURE);
+ if (type == TETHERING_TYPE_USB) CHECK_FEATURE_SUPPORTED(TETHERING_USB_FEATURE); //LCOV_EXCL_LINE
else if (type == TETHERING_TYPE_WIFI) CHECK_FEATURE_SUPPORTED(TETHERING_WIFI_FEATURE);
- else if (type == TETHERING_TYPE_BT) CHECK_FEATURE_SUPPORTED(TETHERING_BT_FEATURE);
+ else if (type == TETHERING_TYPE_BT) CHECK_FEATURE_SUPPORTED(TETHERING_BT_FEATURE); //LCOV_EXCL_LINE
_retvm_if(tethering_is_enabled(tethering, type) == false,
TETHERING_ERROR_NOT_ENABLED,
NULL, G_DBUS_CALL_FLAGS_NONE,
-1, th->cancellable, &error);
if (error)
- ERR("g_dbus_proxy_call_sync is failed and error is %s\n", error->message);
+ ERR("g_dbus_proxy_call_sync is failed and error is %s\n", error->message); //LCOV_EXCL_LINE
g_variant_get(result, "(a(a{sv}))", &outer_iter);
+ //LCOV_EXCL_START
while (g_variant_iter_loop(outer_iter, "(@a{sv})", &station)) {
g_variant_get(station, "a{sv}", &inner_iter);
while (g_variant_iter_loop(inner_iter, "{sv}", &key, &value)) {
}
g_free(client.hostname);
}
+ //LCOV_EXCL_STOP
g_variant_iter_free(outer_iter);
g_variant_unref(station);
g_variant_unref(result);
}
if (*ssid == NULL) {
- ERR("strdup is failed\n");
+ ERR("strdup is failed\n"); //LCOV_EXCL_LINE
return TETHERING_ERROR_OUT_OF_MEMORY;
}
ret = __set_visible(visible);
if (ret == TETHERING_ERROR_NONE) {
-
__send_dbus_signal(th->client_bus,
SIGNAL_NAME_SSID_VISIBILITY_CHANGED,
visible ? SIGNAL_MSG_SSID_VISIBLE :
DBG("+\n");
if (th->settings_reloaded_cb) {
- ERR("Operation in progress\n");
+ ERR("Operation in progress\n"); //LCOV_EXCL_LINE
return TETHERING_ERROR_OPERATION_FAILED;
}
ret = __prepare_wifi_settings(tethering, &set);
if (ret != TETHERING_ERROR_NONE) {
- ERR("softap settings initialization failed\n");
+ ERR("softap settings initialization failed\n"); //LCOV_EXCL_LINE
return TETHERING_ERROR_OPERATION_FAILED;
}
p_mac = strdup(mac);
if (p_mac == NULL) {
- ERR("strdup failed\n");
+ ERR("strdup failed\n"); //LCOV_EXCL_LINE
return TETHERING_ERROR_OUT_OF_MEMORY;
}
fp = fopen(filepath, "a+");
if (!fp) {
- ERR("fopen is failed\n");
+ ERR("fopen is failed\n"); //LCOV_EXCL_LINE
return TETHERING_ERROR_OPERATION_FAILED;
}
while (fgets(line, MAX_BUF_SIZE, fp) != NULL) {
if (strncmp(mac, line, 17) == 0) {
- DBG("MAC %s already exist in the list\n", mac);
+ DBG("MAC %s already exist in the list\n", mac); //LCOV_EXCL_LINE
mac_exist = true;
break;
}
G_DBUS_CALL_FLAGS_NONE, -1, NULL, &error);
if (error) {
+ //LCOV_EXCL_START
ERR("g_dbus_proxy_call_sync failed because %s\n", error->message);
if (error->code == G_DBUS_ERROR_ACCESS_DENIED)
result = TETHERING_ERROR_PERMISSION_DENIED;
th->dhcp_enabled = false;
return result;
+ //LCOV_EXCL_STOP
}
g_variant_get(parameters, "(u)", &result);
g_variant_new("(ss)", rangestart, rangestop),
G_DBUS_CALL_FLAGS_NONE, -1, NULL, &error);
if (error) {
+ //LCOV_EXCL_START
ERR("g_dbus_proxy_call_sync failed because %s\n", error->message);
if (error->code == G_DBUS_ERROR_ACCESS_DENIED)
th->dhcp_enabled = false;
return result;
+ //LCOV_EXCL_STOP
}
g_variant_get(parameters, "(u)", &result);
G_DBUS_CALL_FLAGS_NONE,
-1, th->cancellable, &error);
if (error) {
+ //LCOV_EXCL_START
ERR("g_dbus_proxy_call_sync is failed and error is %s\n", error->message);
g_clear_error(&error);
return TETHERING_ERROR_OPERATION_FAILED;
+ //LCOV_EXCL_STOP
}
return TETHERING_ERROR_NONE;
}
g_variant_get(result, "(u)", txpower);
g_variant_unref(result);
} else {
+ //LCOV_EXCL_START
if (error)
ERR("g_dbus_proxy_call_sync is failed and error is %s\n", error->message);
g_clear_error(&error);
return TETHERING_ERROR_OPERATION_FAILED;
+ //LCOV_EXCL_STOP
}
g_clear_error(&error);
return TETHERING_ERROR_NONE;
g_variant_new("(u)", mtu),
G_DBUS_CALL_FLAGS_NONE, -1, NULL, &error);
if (error) {
+ //LCOV_EXCL_START
ERR("g_dbus_proxy_call_sync failed because %s\n", error->message);
if (error->code == G_DBUS_ERROR_ACCESS_DENIED)
g_error_free(error);
return result;
+ //LCOV_EXCL_STOP
}
g_variant_get(parameters, "(u)", &result);
g_variant_new("(s)", mac),
G_DBUS_CALL_FLAGS_NONE, -1, NULL, &error);
if (error) {
+ //LCOV_EXCL_START
ERR("g_dbus_proxy_call_sync failed because %s\n", error->message);
if (error->code == G_DBUS_ERROR_ACCESS_DENIED)
g_error_free(error);
return result;
+ //LCOV_EXCL_STOP
}
g_variant_get(parameters, "(u)", &result);
g_variant_new("(b)", enable),
G_DBUS_CALL_FLAGS_NONE, -1, NULL, &error);
if (error) {
+ //LCOV_EXCL_START
ERR("g_dbus_proxy_call_sync failed because %s\n", error->message);
if (error->code == G_DBUS_ERROR_ACCESS_DENIED)
g_error_free(error);
return result;
+ //LCOV_EXCL_STOP
}
g_variant_get(parameters, "(u)", &result);
g_variant_new("(sssisi)", ifname, protocol, org_ip, org_port, final_ip, final_port),
G_DBUS_CALL_FLAGS_NONE, -1, NULL, &error);
if (error) {
+ //LCOV_EXCL_START
ERR("g_dbus_proxy_call_sync failed because %s\n", error->message);
if (error->code == G_DBUS_ERROR_ACCESS_DENIED)
g_error_free(error);
return result;
+ //LCOV_EXCL_STOP
}
g_variant_get(parameters, "(u)", &result);
list = strdup(cmd);
if (list == NULL) {
- ERR("strdup failed\n");
+ ERR("strdup failed\n"); //LCOV_EXCL_LINE
return TETHERING_ERROR_OUT_OF_MEMORY;
}
parameters = g_dbus_proxy_call_sync(proxy, "reset_port_forwarding_rule",
NULL, G_DBUS_CALL_FLAGS_NONE, -1, NULL, &error);
if (error) {
+ //LCOV_EXCL_START
ERR("g_dbus_proxy_call_sync failed because %s\n", error->message);
if (error->code == G_DBUS_ERROR_ACCESS_DENIED)
g_error_free(error);
return result;
+ //LCOV_EXCL_STOP
}
g_variant_get(parameters, "(u)", &result);
g_variant_new("(b)", enable),
G_DBUS_CALL_FLAGS_NONE, -1, NULL, &error);
if (error) {
+ //LCOV_EXCL_START
ERR("g_dbus_proxy_call_sync failed because %s\n", error->message);
if (error->code == G_DBUS_ERROR_ACCESS_DENIED)
g_error_free(error);
return result;
+ //LCOV_EXCL_STOP
}
g_variant_get(parameters, "(u)", &result);
g_variant_new("(isb)", port, protocol, allow),
G_DBUS_CALL_FLAGS_NONE, -1, NULL, &error);
if (error) {
+ //LCOV_EXCL_START
ERR("g_dbus_proxy_call_sync failed because %s\n", error->message);
if (error->code == G_DBUS_ERROR_ACCESS_DENIED)
g_error_free(error);
return result;
+ //LCOV_EXCL_STOP
}
g_variant_get(parameters, "(u)", &result);
list = strdup(cmd);
if (list == NULL) {
- ERR("strdup failed\n");
+ ERR("strdup failed\n"); //LCOV_EXCL_LINE
return TETHERING_ERROR_OUT_OF_MEMORY;
}
g_variant_new("(iisb)", port1, port2, protocol, allow),
G_DBUS_CALL_FLAGS_NONE, -1, NULL, &error);
if (error) {
+ //LCOV_EXCL_START
ERR("g_dbus_proxy_call_sync failed because %s\n", error->message);
if (error->code == G_DBUS_ERROR_ACCESS_DENIED)
g_error_free(error);
return result;
+ //LCOV_EXCL_STOP
}
g_variant_get(parameters, "(u)", &result);
list = strdup(cmd);
if (list == NULL) {
- ERR("strdup failed\n");
+ ERR("strdup failed\n"); //LCOV_EXCL_LINE
return TETHERING_ERROR_OUT_OF_MEMORY;
}
g_variant_new("(ib)", type, enable),
G_DBUS_CALL_FLAGS_NONE, -1, NULL, &error);
if (error) {
+ //LCOV_EXCL_START
ERR("g_dbus_proxy_call_sync failed because %s\n", error->message);
if (error->code == G_DBUS_ERROR_ACCESS_DENIED)
g_error_free(error);
return result;
+ //LCOV_EXCL_STOP
}
g_variant_get(parameters, "(u)", &result);
NULL, G_DBUS_CALL_FLAGS_NONE, -1, NULL, &error);
if (error) {
+ //LCOV_EXCL_START
ERR("g_dbus_proxy_call_sync failed because %s\n", error->message);
if (error->code == G_DBUS_ERROR_ACCESS_DENIED)
g_error_free(error);
return ret;
+ //LCOV_EXCL_STOP
}
if (parameters != NULL) {
g_variant_new("(s)", wps_pin), G_DBUS_CALL_FLAGS_NONE, -1, NULL, &error);
if (error) {
+ //LCOV_EXCL_START
ERR("g_dbus_proxy_call_sync failed because %s\n", error->message);
if (error->code == G_DBUS_ERROR_ACCESS_DENIED)
g_error_free(error);
return ret;
+ //LCOV_EXCL_STOP
}
if (parameters != NULL) {