Commit 2be6d51c authored by Amarnath Valluri's avatar Amarnath Valluri

using correct dbus socket address and limited testbus server for session bus.

parent 35c88ef5
......@@ -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"
......
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment