mirror of
https://git.kernel.org/pub/scm/bluetooth/bluez.git
synced 2024-12-02 08:34:26 +08:00
obexd: move __obex_log_init before manager_init
This enables us to log target during initialization
This commit is contained in:
parent
7605e6c809
commit
ec0e7836cf
@ -87,11 +87,11 @@ int main(int argc, char *argv[])
|
||||
|
||||
event_loop = g_main_loop_new(NULL, FALSE);
|
||||
|
||||
__obex_log_init("obex-client", option_debug, !option_stderr);
|
||||
|
||||
if (manager_init() < 0)
|
||||
exit(EXIT_FAILURE);
|
||||
|
||||
__obex_log_init("obex-client", option_debug, !option_stderr);
|
||||
|
||||
DBG("Entering main loop");
|
||||
|
||||
memset(&sa, 0, sizeof(sa));
|
||||
|
@ -571,7 +571,7 @@ int manager_init(void)
|
||||
|
||||
conn = g_dbus_setup_bus(DBUS_BUS_SESSION, CLIENT_SERVICE, &derr);
|
||||
if (dbus_error_is_set(&derr) == TRUE) {
|
||||
g_printerr("%s: %s\n", derr.name, derr.message);
|
||||
error("%s: %s", derr.name, derr.message);
|
||||
dbus_error_free(&derr);
|
||||
return -1;
|
||||
}
|
||||
@ -579,7 +579,7 @@ int manager_init(void)
|
||||
if (g_dbus_register_interface(conn, CLIENT_PATH, CLIENT_INTERFACE,
|
||||
client_methods, NULL, NULL,
|
||||
NULL, NULL) == FALSE) {
|
||||
g_printerr("Can't register client interface\n");
|
||||
error("Can't register client interface");
|
||||
dbus_connection_unref(conn);
|
||||
conn = NULL;
|
||||
return -1;
|
||||
|
Loading…
Reference in New Issue
Block a user