obexd: move __obex_log_init before manager_init

This enables us to log target during initialization
This commit is contained in:
Luiz Augusto von Dentz 2011-08-12 11:45:08 +03:00 committed by Marcel Holtmann
parent 7605e6c809
commit ec0e7836cf
2 changed files with 4 additions and 4 deletions

View File

@ -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));

View File

@ -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;