Commit dd7122b5 authored by Jiří Klimeš's avatar Jiří Klimeš
Browse files

core: NMVPNPlugin initialization changed to use GInitable (rh #1050934)

https://bugzilla.redhat.com/show_bug.cgi?id=1050934
parent ba343812
......@@ -57,7 +57,7 @@ AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [Gettext package])
IT_PROG_INTLTOOL([0.35])
AM_GLIB_GNU_GETTEXT
PKG_CHECK_MODULES(GLIB, glib-2.0 >= 2.32)
PKG_CHECK_MODULES(GLIB, gio-unix-2.0 >= 2.32)
AC_SUBST(GLIB_CFLAGS)
AC_SUBST(GLIB_LIBS)
GLIB_CFLAGS="$GLIB_CFLAGS -DGLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_32"
......
......@@ -15,7 +15,7 @@
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Copyright (C) 2010 - 2011 Red Hat, Inc.
* Copyright (C) 2010 - 2014 Red Hat, Inc.
*/
#include <config.h>
......@@ -31,6 +31,7 @@
#include <locale.h>
#include <glib/gi18n.h>
#include <gio/gio.h>
#include <nm-setting-vpn.h>
#include "nm-openswan-service.h"
......@@ -803,9 +804,18 @@ nm_openswan_plugin_class_init (NMOPENSWANPluginClass *openswan_class)
NMOPENSWANPlugin *
nm_openswan_plugin_new (void)
{
return (NMOPENSWANPlugin *) g_object_new (NM_TYPE_OPENSWAN_PLUGIN,
NM_VPN_PLUGIN_DBUS_SERVICE_NAME, NM_DBUS_SERVICE_OPENSWAN,
NULL);
NMOPENSWANPlugin *plugin;
GError *error = NULL;
plugin = g_initable_new (NM_TYPE_OPENSWAN_PLUGIN, NULL, &error,
NM_VPN_PLUGIN_DBUS_SERVICE_NAME, NM_DBUS_SERVICE_OPENSWAN,
NULL);
if (!plugin) {
g_warning ("%s", error->message);
g_error_free (error);
}
return plugin;
}
static void
......
Supports Markdown
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