From: Amarnath Valluri Date: Wed, 29 May 2013 09:06:37 +0000 (+0300) Subject: using correct dbus socket address and limited testbus server for session bus. X-Git-Tag: upstream/2.4.0^2~99 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=29ae1193494582ae319ee669bc540db9a8efe3aa;p=platform%2Fupstream%2Flibgsignon-glib.git using correct dbus socket address and limited testbus server for session bus. --- diff --git a/configure.ac b/configure.ac index 43fe45c..f90946b 100644 --- a/configure.ac +++ b/configure.ac @@ -49,21 +49,22 @@ echo " DBUS TYPE : '$enable_dbus_type'" echo "-----------------------" if test "x$enable_dbus_type" = "xp2p" ; then AC_DEFINE(USE_P2P, [1], [Use peer to peer dbus]) - AC_DEFINE(SIGNOND_BUS_ADDRESS, ["unix:abstract=gsignond"], [signond daemon server socket address]) + AC_DEFINE(SIGNOND_BUS_ADDRESS, ["unix:path=%s/gsignond/bus-sock"], [signond daemon server socket address]) elif test "x$enable_dbus_type" = "xsession" ; then AC_DEFINE(SIGNOND_BUS_TYPE, [G_BUS_TYPE_SESSION], [Use session bus]) + + # Build tests. + PKG_CHECK_MODULES(GTestDBus, glib-2.0 >= 2.34, [gtestdbus=yes], [gtestdbus=no]) + if test "x$gtestdbus" = xyes; then + AC_DEFINE(HAVE_GTESTDBUS, [1], [Define if GTestDBus exists.]) + else + AC_DEFINE(HAVE_GTESTDBUS, [0], [GTestDBus does not exist.]) + fi elif test "x$enable_dbus_type" = "xsystem" ; then AC_DEFINE(SIGNOND_BUS_TYPE, [G_BUS_TYPE_SYSTEM], [Use system bus]) fi -# Build tests. -PKG_CHECK_MODULES(GTestDBus, glib-2.0 >= 2.34, [gtestdbus=yes], [gtestdbus=no]) AM_CONDITIONAL(HAVE_GTESTDBUS, [test x$gtestdbus = xyes]) -if test "x$gtestdbus" = xyes; then - AC_DEFINE(HAVE_GTESTDBUS, [1], [Define if GTestDBus exists.]) -else - AC_DEFINE(HAVE_GTESTDBUS, [0], [GTestDBus does not exist.]) -fi CHECK_REQUIRED="check >= 0.9.4" diff --git a/libgsignon-glib/sso-auth-service.c b/libgsignon-glib/sso-auth-service.c index eccdf56..f8a3cf0 100644 --- a/libgsignon-glib/sso-auth-service.c +++ b/libgsignon-glib/sso-auth-service.c @@ -106,11 +106,13 @@ sso_auth_service_get_instance () if (sso_auth_service != NULL) return sso_auth_service; #ifdef USE_P2P - connection = g_dbus_connection_new_for_address_sync (SIGNOND_BUS_ADDRESS, + gchar *bus_address = g_strdup_printf (SIGNOND_BUS_ADDRESS, g_get_user_runtime_dir()); + connection = g_dbus_connection_new_for_address_sync (bus_address, G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_CLIENT, NULL, NULL, &error); + g_free (bus_address); #else connection = g_bus_get_sync (SIGNOND_BUS_TYPE, NULL, &error); #endif