dbus_bool_t result;
char *event, *iface, *address;
+#if !GLIB_CHECK_VERSION (2, 35, 0)
g_type_init ();
+#endif
if (argc != 4) {
fprintf (stderr, "Error: expected 3 arguments (event, interface, address).\n");
g_option_context_free (opt_ctx);
+#if !GLIB_CHECK_VERSION (2, 35, 0)
g_type_init ();
+#endif
+
g_unix_signal_add (SIGTERM, signal_handler, GINT_TO_POINTER (SIGTERM));
g_unix_signal_add (SIGINT, signal_handler, GINT_TO_POINTER (SIGINT));
g_assert (argc > 1);
g_test_init (&argc, &argv, NULL);
+
+#if !GLIB_CHECK_VERSION (2, 35, 0)
g_type_init ();
+#endif
g_test_add_data_func ("/dispatcher/old_up", argv[1], (GTestDataFunc) test_old_up);
g_test_add_data_func ("/dispatcher/old_down", argv[1], (GTestDataFunc) test_old_down);
textdomain (GETTEXT_PACKAGE);
#endif
+#if !GLIB_CHECK_VERSION (2, 35, 0)
g_type_init ();
+#endif
nmc_init (&nm_cli);
g_idle_add (start, &args_info);
DBusGConnection *bus;
DBusGProxy *proxy;
+#if !GLIB_CHECK_VERSION (2, 35, 0)
/* Initialize GType system */
g_type_init ();
+#endif
/* Get system bus */
bus = dbus_g_bus_get (DBUS_BUS_SYSTEM, NULL);
NMRemoteSettings *settings;
GMainLoop *loop;
+#if !GLIB_CHECK_VERSION (2, 35, 0)
/* Initialize GType system */
g_type_init ();
+#endif
loop = g_main_loop_new (NULL, FALSE);
DBusGConnection *bus;
DBusGProxy *props_proxy;
+#if !GLIB_CHECK_VERSION (2, 35, 0)
/* Initialize GType system */
g_type_init ();
+#endif
/* Get system bus */
bus = dbus_g_bus_get (DBUS_BUS_SYSTEM, NULL);
const GPtrArray *devices;
int i;
+#if !GLIB_CHECK_VERSION (2, 35, 0)
/* Initialize GType system */
g_type_init ();
+#endif
/* Get system bus */
bus = dbus_g_bus_get (DBUS_BUS_SYSTEM, NULL);
DBusGConnection *bus;
DBusGProxy *proxy;
+#if !GLIB_CHECK_VERSION (2, 35, 0)
/* Initialize GType system */
g_type_init ();
+#endif
/* Get system bus */
bus = dbus_g_bus_get (DBUS_BUS_SYSTEM, NULL);
{
DBusGConnection *bus;
+#if !GLIB_CHECK_VERSION (2, 35, 0)
/* Initialize GType system */
g_type_init ();
+#endif
/* Get system bus */
bus = dbus_g_bus_get (DBUS_BUS_SYSTEM, NULL);
GMainLoop *loop;
GBusNameWatcherFlags flags;
+#if !GLIB_CHECK_VERSION (2, 35, 0)
/* Initialize GType system */
g_type_init ();
+#endif
g_print ("Monitor 'org.freedesktop.NetworkManager' D-Bus name\n");
g_print ("===================================================\n");
GError *err = NULL;
gboolean nm_running;
+#if !GLIB_CHECK_VERSION (2, 35, 0)
/* Initialize GType system */
g_type_init ();
+#endif
g_print ("Monitor 'org.freedesktop.NetworkManager' D-Bus name\n");
g_print ("===================================================\n");
GDBusProxyFlags flags;
GDBusProxy *proxy;
+#if !GLIB_CHECK_VERSION (2, 35, 0)
/* Initialize GType system */
g_type_init ();
+#endif
/* Monitor 'StateChanged' signal on 'org.freedesktop.NetworkManager' interface */
g_print ("Monitor NetworkManager's state\n");
{
NMClient *client;
+#if !GLIB_CHECK_VERSION (2, 35, 0)
g_type_init ();
+#endif
client = nm_client_new ();
if (!client) {
{
libnm_glib_ctx *ctx = NULL;
+#if !GLIB_CHECK_VERSION (2, 35, 0)
g_type_init ();
+#endif
+
if (!g_thread_supported ())
g_thread_init (NULL);
dbus_g_thread_init ();
{
g_assert (argc == 3);
+#if !GLIB_CHECK_VERSION (2, 35, 0)
g_type_init ();
+#endif
g_test_init (&argc, &argv, NULL);
g_assert (argc == 3);
+#if !GLIB_CHECK_VERSION (2, 35, 0)
g_type_init ();
+#endif
g_test_init (&argc, &argv, NULL);
{
DBusGConnection *bus;
+#if !GLIB_CHECK_VERSION (2, 35, 0)
g_type_init ();
+#endif
+
bus = dbus_g_bus_get (DBUS_BUS_SESSION, NULL);
compare_ints ();
_ensure_registered (void)
{
if (G_UNLIKELY (registered_settings == NULL)) {
+#if !GLIB_CHECK_VERSION (2, 35, 0)
g_type_init ();
+#endif
_nm_value_transforms_register ();
registered_settings = g_hash_table_new (g_str_hash, g_str_equal);
registered_settings_by_type = g_hash_table_new (_nm_gtype_hash, _nm_gtype_equal);
GError *error = NULL;
char *base;
+#if !GLIB_CHECK_VERSION (2, 35, 0)
g_type_init ();
+#endif
if (!nm_utils_init (&error))
FAIL ("nm-utils-init", "failed to initialize libnm-util: %s", error->message);
GError *error = NULL;
char *base;
+#if !GLIB_CHECK_VERSION (2, 35, 0)
g_type_init ();
+#endif
if (!nm_utils_init (&error))
FAIL ("nm-utils-init", "failed to initialize libnm-util: %s", error->message);
if (argc < 3)
FAIL ("init", "need at least two arguments: <path> <password>");
+#if !GLIB_CHECK_VERSION (2, 35, 0)
g_type_init ();
+#endif
if (!nm_utils_init (&error))
FAIL ("nm-utils-init", "failed to initialize libnm-util: %s", error->message);
gboolean success;
g_test_init (&argc, &argv, NULL);
+
+#if !GLIB_CHECK_VERSION (2, 35, 0)
g_type_init ();
+#endif
success = nm_utils_init (&error);
g_assert_no_error (error);
GError *error = NULL;
char *base;
+#if !GLIB_CHECK_VERSION (2, 35, 0)
g_type_init ();
+#endif
if (!nm_utils_init (&error))
FAIL ("nm-utils-init", "failed to initialize libnm-util: %s", error->message);
int
main (int argc, char **argv)
{
+#if !GLIB_CHECK_VERSION (2, 35, 0)
g_type_init ();
+#endif
+
g_test_init (&argc, &argv, NULL);
g_test_add_func ("/config/simple", test_config_simple);
{
gsize i;
+#if !GLIB_CHECK_VERSION (2, 35, 0)
g_type_init ();
+#endif
+
g_test_init (&argc, &argv, NULL);
g_test_add_func ("/wifi/lock_bssid",
{
g_test_init (&argc, &argv, NULL);
+#if !GLIB_CHECK_VERSION (2, 35, 0)
g_type_init ();
+#endif
g_test_add_func ("/dhcp/dhclient/orig_missing", test_orig_missing);
g_test_add_func ("/dhcp/dhclient/override_client_id", test_override_client_id);
{
g_test_init (&argc, &argv, NULL);
+#if !GLIB_CHECK_VERSION (2, 35, 0)
g_type_init ();
+#endif
g_test_add_func ("/dnsmasq-manager/address-ranges", test_address_ranges);
nm_logging_syslog_openlog (debug);
+#if !GLIB_CHECK_VERSION (2, 35, 0)
g_type_init ();
+#endif
+
dbus_threads_init_default ();
/* Ensure that non-exported properties don't leak out, and that the
int
main (int argc, char **argv)
{
+#if !GLIB_CHECK_VERSION (2, 35, 0)
g_type_init ();
+#endif
g_assert (argc <= 2);
if (argc > 1 && !g_strcmp0 (argv[1], "--fake"))
{
GMainLoop *loop;
+#if !GLIB_CHECK_VERSION (2, 35, 0)
g_type_init ();
+#endif
+
loop = g_main_loop_new (NULL, FALSE);
nm_logging_setup ("debug", NULL, NULL, NULL);
openlog (G_LOG_DOMAIN, LOG_CONS | LOG_PERROR, LOG_DAEMON);
gboolean status = TRUE;
int error;
+#if !GLIB_CHECK_VERSION (2, 35, 0)
g_type_init ();
+#endif
if (*argv && !g_strcmp0 (argv[1], "--fake")) {
nm_fake_platform_setup ();
int result;
openlog (G_LOG_DOMAIN, LOG_CONS | LOG_PERROR, LOG_DAEMON);
+
+#if !GLIB_CHECK_VERSION (2, 35, 0)
g_type_init ();
+#endif
+
g_test_init (&argc, &argv, NULL);
/* Enable debug messages if called with --debug */
for (; *argv; argv++) {
DBusGConnection *bus;
GError *err = NULL;
+#if !GLIB_CHECK_VERSION (2, 35, 0)
g_type_init ();
+#endif
g_message ("nm-ppp-plugin: (%s): initializing", __func__);
const char *ifname;
char mac[6] = { 0x02, 0xaa, 0xbb, 0xcc, 0xdd, 0xee };
+#if !GLIB_CHECK_VERSION (2, 35, 0)
g_type_init ();
+#endif
+
loop = g_main_loop_new (NULL, FALSE);
nm_logging_setup ("debug", "ip6", NULL, NULL);
openlog (G_LOG_DOMAIN, LOG_CONS | LOG_PERROR, LOG_DAEMON);
g_log_set_always_fatal (G_LOG_LEVEL_CRITICAL);
#endif
+#if !GLIB_CHECK_VERSION (2, 35, 0)
g_type_init ();
+#endif
success = nm_utils_init (&error);
g_assert_no_error (error);
{
char *f;
+#if !GLIB_CHECK_VERSION (2, 35, 0)
g_type_init ();
+#endif
+
nm_linux_platform_setup ();
nm_logging_setup ("WARN", "DEFAULT", NULL, NULL);
{
GError *error = NULL;
+#if !GLIB_CHECK_VERSION (2, 35, 0)
g_type_init ();
+#endif
if (!nm_utils_init (&error))
FAIL ("nm-utils-init", "failed to initialize libnm-util: %s", error->message);
GError *error = NULL;
char *base;
+#if !GLIB_CHECK_VERSION (2, 35, 0)
g_type_init ();
+#endif
+
g_log_set_always_fatal (G_LOG_LEVEL_MASK);
if (!nm_utils_init (&error))
int
main (int argc, char **argv)
{
+#if !GLIB_CHECK_VERSION (2, 35, 0)
g_type_init ();
+#endif
+
g_test_init (&argc, &argv, NULL);
g_test_add_func ("/defname/no_connections", test_defname_no_connections);
GError *error = NULL;
char *base;
+#if !GLIB_CHECK_VERSION (2, 35, 0)
g_type_init ();
+#endif
if (!nm_utils_init (&error))
FAIL ("nm-utils-init", "failed to initialize libnm-util: %s", error->message);
{
g_test_init (&argc, &argv, NULL);
+#if !GLIB_CHECK_VERSION (2, 35, 0)
g_type_init ();
+#endif
g_test_add_func ("/dcb/fcoe", test_dcb_fcoe);
g_test_add_func ("/dcb/iscsi", test_dcb_iscsi);
g_log_set_always_fatal (G_LOG_LEVEL_CRITICAL);
#endif
+#if !GLIB_CHECK_VERSION (2, 35, 0)
g_type_init ();
+#endif
if (!nm_utils_init (&error))
FAIL ("nm-utils-init", "failed to initialize libnm-util: %s", error->message);
{
g_test_init (&argc, &argv, NULL);
+#if !GLIB_CHECK_VERSION (2, 35, 0)
g_type_init ();
+#endif
g_test_add_func ("/general/nm_utils_ascii_str_to_int64", test_nm_utils_ascii_str_to_int64);
g_test_add_func ("/general/nm_utils_ip6_address_clear_host_address", test_nm_utils_ip6_address_clear_host_address);
{
g_test_init (&argc, &argv, NULL);
+#if !GLIB_CHECK_VERSION (2, 35, 0)
g_type_init ();
+#endif
g_test_add_func ("/ip4-config/subtract", test_subtract);
g_test_add_func ("/ip4-config/compare-with-source", test_compare_with_source);
{
g_test_init (&argc, &argv, NULL);
-#if !GLIB_CHECK_VERSION (2,36,0)
+#if !GLIB_CHECK_VERSION (2,35,0)
g_type_init ();
#endif
DBusConnection *connection;
DBusError error;
+#if !GLIB_CHECK_VERSION (2, 35, 0)
g_type_init ();
+#endif
dbus_error_init (&error);
connection = dbus_bus_get (DBUS_BUS_SYSTEM, &error);
return 2;
}
+#if !GLIB_CHECK_VERSION (2, 35, 0)
g_type_init ();
+#endif
client = nm_client_new ();
if (!client) {
usage (argv[0]);
}
+#if !GLIB_CHECK_VERSION (2, 35, 0)
g_type_init ();
+#endif
if (!nm_utils_init (&error)) {
fprintf (stderr, "ERR: failed to initialize libnm-util: %s", error->message);