static int __dbus_init(void)
{
- bool ret = false;
+ bool ret = true;
GError *error = NULL;
gdbus_conn = g_bus_get_sync(G_BUS_TYPE_SESSION, NULL, &error);
_LOGE("Failed to get dbus [%s]", error->message);
g_error_free(error);
}
- goto out;
+ ret = false;
}
- ret = true;
-
-out:
- if (!gdbus_conn)
- g_object_unref(gdbus_conn);
-
return ret;
-
}
bool initialize_common(void)
{
int ret = 0;
int data_len;
- int local_port_len = 0;
unsigned int nb = 0;
bundle_raw *kb_data = NULL;
int sequence = SEQUENCE_START;
goto out;
}
- if (local_port != NULL)
- local_port_len = strlen(local_port) + 1;
-
ret = write_string_to_socket(port_info->send_sock_fd, local_port,
- local_port_len, &nb, &sequence);
+ strlen(local_port) + 1, &nb, &sequence);
if (ret != MESSAGE_PORT_ERROR_NONE) {
_LOGE("write local_port fail");
goto out;