comparison libpurple/dbus-server.c @ 29239:02bc1e883f05

merged with im.pidgin.pidgin
author Yoshiki Yazawa <yaz@honeyplanet.jp>
date Wed, 06 Jan 2010 22:51:29 +0900
parents 5819bf02659e
children 9f6b8e5998ec
comparison
equal deleted inserted replaced
29209:39bc284215ce 29239:02bc1e883f05
599 static void 599 static void
600 purple_dbus_dispatch_init(void) 600 purple_dbus_dispatch_init(void)
601 { 601 {
602 static DBusObjectPathVTable vtable = {NULL, &purple_dbus_dispatch, NULL, NULL, NULL, NULL}; 602 static DBusObjectPathVTable vtable = {NULL, &purple_dbus_dispatch, NULL, NULL, NULL, NULL};
603 DBusError error; 603 DBusError error;
604 int result;
605 604
606 dbus_error_init(&error); 605 dbus_error_init(&error);
607 purple_dbus_connection = dbus_bus_get(DBUS_BUS_STARTER, &error); 606 purple_dbus_connection = dbus_bus_get(DBUS_BUS_STARTER, &error);
608 607
609 if (purple_dbus_connection == NULL) 608 if (purple_dbus_connection == NULL)
623 init_error = g_strdup_printf(N_("Failed to get name: %s"), error.name); 622 init_error = g_strdup_printf(N_("Failed to get name: %s"), error.name);
624 dbus_error_free(&error); 623 dbus_error_free(&error);
625 return; 624 return;
626 } 625 }
627 626
628 dbus_request_name_reply = 627 dbus_request_name_reply = dbus_bus_request_name(purple_dbus_connection,
629 result = dbus_bus_request_name(purple_dbus_connection,
630 DBUS_SERVICE_PURPLE, 0, &error); 628 DBUS_SERVICE_PURPLE, 0, &error);
631 629
632 if (dbus_error_is_set(&error)) 630 if (dbus_error_is_set(&error))
633 { 631 {
634 dbus_connection_unref(purple_dbus_connection); 632 dbus_connection_unref(purple_dbus_connection);
635 dbus_error_free(&error);
636 purple_dbus_connection = NULL; 633 purple_dbus_connection = NULL;
637 init_error = g_strdup_printf(N_("Failed to get serv name: %s"), error.name); 634 init_error = g_strdup_printf(N_("Failed to get serv name: %s"), error.name);
635 dbus_error_free(&error);
638 return; 636 return;
639 } 637 }
640 638
641 dbus_connection_setup_with_g_main(purple_dbus_connection, NULL); 639 dbus_connection_setup_with_g_main(purple_dbus_connection, NULL);
642 640