コード例 #1
0
ファイル: test_all.c プロジェクト: binli/NetworkManager
int
main (void)
{
//      g_mem_set_vtable(glib_mem_profiler_table);
//      g_atexit(g_mem_profile);
	g_type_init ();
	ifnet_destroy ();
	wpa_parser_destroy ();
	ifnet_init ("net");
	wpa_parser_init ("wpa_supplicant.conf");
	printf ("Initialization complete\n");
	run_all (TRUE);
	ifnet_destroy ();
	wpa_parser_destroy ();
	return 0;
}
コード例 #2
0
gboolean
reload_parsers ()
{
	ifnet_destroy ();
	wpa_parser_destroy ();
	if (!ifnet_init (CONF_NET_FILE))
		return FALSE;
	wpa_parser_init (WPA_SUPPLICANT_CONF);
	return TRUE;
}
コード例 #3
0
static void
dispose (GObject * object)
{
	SCPluginIfnet *plugin = SC_PLUGIN_IFNET (object);
	SCPluginIfnetPrivate *priv = SC_PLUGIN_IFNET_GET_PRIVATE (plugin);

	cancel_monitors (NULL, object);
	if (priv->config_connections) {
		g_hash_table_remove_all (priv->config_connections);
		g_hash_table_destroy (priv->config_connections);
	}

	if (priv->hostname)
		g_free (priv->hostname);
	ifnet_destroy ();
	wpa_parser_destroy ();
	G_OBJECT_CLASS (sc_plugin_ifnet_parent_class)->dispose (object);
}