Commit Graph

11 Commits

Author SHA1 Message Date
Robert Love
46efeb868a 2006-01-11 Robert Love <rml@novell.com>
* configure.in: Add the gcc flags '-Wshadow' and '-Wfloat-equal'.
	* gnome/applet/applet.c, gnome/vpn-properties/nm-vpn-properties.c,
	  src/NetworkManagerAPList.c, src/NetworkManagerDbus.c,
	  src/NetworkManagerPolicy.c, src/NetworkManagerSystem.c,
	  src/nm-dbus-device.c, src/nm-device-802-3-ethernet.c,
	  src/nm-ip4-config.c, src/vpn-manager/nm-vpn-manager.c,
	  test/nmtestdevices.c: Fix shadowed variable usage as appropriate.
	* src/nm-device-802-11-wireless.c: Fix floating point comparison by
	  comparing values within DBL_EPSILON.  Also fix shadowed variable
	  usage.


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@1318 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2006-01-11 21:07:29 +00:00
Dan Williams
bfae8891a7 2005-12-06 Dan Williams <dcbw@redhat.com>
* Change naming of NMDeviceType to something more sensible:
		NM_DEVICE_TYPE_DONT_KNOW -> NM_DEVICE_TYPE_UNKNOWN
		NM_DEVICE_TYPE_WIRED_ETHERNET -> NM_DEVICE_TYPE_802_3_ETHERNET
		NM_DEVICE_TYPE_WIRELESS_ETHERNET -> NM_DEVICE_TYPE_802_11_WIRELESS


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@1131 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2005-12-07 00:22:52 +00:00
Robert Love
fa4e8074e7 2005-10-07 Robert Love <rml@novell.com>
* gnome/applet/applet-dbus-info.c, gnome/applet/applet.c,
          gnome/applet/applet.h, gnome/vpn-properties/nm-vpn-properties.c,
          src/dhcp-manager/nm-dhcp-manager.c, test/libnm_glib_test.c,
          test/nmtest.c test/nmtestdevices.c: mark functions 'static' as
          appropriate


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@1004 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2005-10-07 19:17:06 +00:00
Christopher Aillon
314e6fc426 2005-09-10 Christopher Aillon <caillon@redhat.com>
* gnome/applet/applet.c:
	* gnome/applet/applet-dbus-devices.c:
	* gnome/applet/applet-dbus-info.c:
	* gnome/applet/passphrase-dialog.c:
	* gnome/libnm_glib/libnm_glib.c:
	* gnome/vpn-properties/nm-vpn-properties.c:
	* src/autoip.c:
	* src/backends/NetworkManagerRedHat.c:
	* src/named-manager/nm-named-manager.c:
	* src/NetworkManagerAPList.c:
	* src/NetworkManager.c:
	* src/NetworkManagerDbus.c:
	* src/NetworkManagerDevice.c:
	* src/NetworkManagerPolicy.c:
	* src/NetworkManagerSystem.c:
	* src/nm-dbus-device.c:
	* src/nm-dbus-nm.c:
	* src/vpn-manager/nm-vpn-manager.c:
	* src/vpn-manager/nm-vpn-service.c:
	* test/libnm_glib_test.c:
	* test/nminfotest.c:
	* test/nmtestdevices.c:
	Fix up a bunch of 'unused variable' compiler warnings


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@959 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2005-09-11 02:32:30 +00:00
Bastien Nocera
41885daa5b 2005-08-30 Bastien Nocera <hadess@hadess.net>
* test/nmtestdevices.c: (print_usage), (main):
	Check the number of arguments, and fix a typo


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@910 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2005-08-30 15:32:09 +00:00
Dan Williams
12bc1bb923 2005-02-25 Dan Williams <dcbw@redhat.com>
* info-daemon/NetworkManagerInfoDbus.c
		- (nmi_dbus_get_network_properties): whack usage of DbusMessageIter

	* test/nminfotest.c
		- Whack usage of DbusMessageIter
		- Clean up DbusError and DbusMessage handling and freeing
		- Remove unused unregister handler

	* test/nmtest.c
		- Whack usage of DbusMessageIter

	* test/nmtestdevices.c
		- Whack usage of DbusMessageIter


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@471 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2005-02-25 20:48:58 +00:00
Colin Walters
0402864d0a 2004-12-01 Colin Walters <walters@redhat.com>
* configure.in: Suck in gcc warnings code from Rhythmbox,
	but use fewer default flags, and in particular add -Wno-unused,
	since the codebase has a lot of unused variables.

	* test/nmtestdevices.c (create_device):
	* test/nminfotest.c (get_network_string_property)
	(get_networks_of_type):
	* test/nmclienttest.c (main):
	* src/NetworkManagerDbus.c (nm_dbus_create_error_message):
	* initscript/NMLaunchHelper.c (get_nm_status):
	* info-daemon/NetworkManagerInfoPassphraseDialog.c (update_button_cb):
	* info-daemon/NetworkManagerInfoDbus.c (nmi_dbus_create_error_message):
	Fix declarations after statements.


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@331 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2004-12-01 22:45:10 +00:00
Colin Walters
2e661cc3f1 2004-12-01 Colin Walters <walters@redhat.com>
* test/nmtestdevices.c, test/nmclienttest.c: Add missing
	includes.


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@328 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2004-12-01 20:45:25 +00:00
Dan Williams
faae8945db 2004-10-21 Dan Williams <dcbw@redhat.com>
* NetworkManager.h
		- New file, now contains commonly used structures and bits
			for the dbus API of NetworkManager

	* Makefile.am
		- Deliver NetworkManager.h to ${includedir}/NetworkManager

	* src/NetworkManager.h
		- Rename -> src/NetworkManagerMain.c

	* Various fixups all around to use NetworkManager.h and new
		src/NetworkManagerMain.h, remove redundant bits that got
		moved into NetworkManager.h

	* src/NetworkManagerDevice.[ch]
	  src/NetworkManagerUtils.[ch]
	  src/NetworkManagerPolicy.c
	  src/NetworkManagerDbus.c
		- Whitelist wireless drivers, and blacklist some wired
			drivers.  Also blacklist cipsec and ethernet-over-usb
			devices at this time (RH #135722, RH #135648)
		- Don't leak unsupported devices out over dbus, or allow
			them to be set as the active device.  Skip over them
			during automatic device picking

	* test/nmclienttest.c
		- Clean up the dbus code a lot


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@261 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2004-10-21 17:42:14 +00:00
Dan Williams
c396b6b27d 2004-10-18 Dan Williams <dcbw@redhat.com>
Patches from Thom May:
	* test/nmtestdevices.c
		- Include <string.h>
	* src/backends/NetworkManagerDebian.c:
		- (nm_system_device_run_dhcp, nm_system_device_stop_dhcp)
			(nm_system_device_flush_routes, nm_system_device_flush_addresses)
			Move to using g_strdup_printf rather than arbitrary buffers
		- (nm_system_device_setup_static_ip4_config) Implement function.
		- (nm_system_kill_all_dhcp_daemons) Use killall -q rather than killall


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@256 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2004-10-19 02:27:04 +00:00
Dan Williams
4de66efbd4 2004-08-31 Dan Williams <dcbw@redhat.com>
* Remove 'debug' extern global from all files since we now
		use syslog()

	* src/NetworkManager.[ch]
		- Break out routine that get the net.interface property from HAL,
			removing that logic from nm_create_device_and_add_to_list()
		- (nm_create_device_and_add_to_list): make this a bit more general so
			it doesn't do the talking to HAL.  Also add arguments to facilitate
			the create of test devices.
		- (nm_data_mark_state_changed): rename from nm_data_set_state_modified()
		- (nm_data_new, main, nm_print_usage): add new argument "--enable-test-devices"
			which makes NetworkManager listen for dbus commands to create test
			devices, which have no backing hardware.  Use when you're on a plane
			for example, and/or forgot your wireless card at home.  Test devices
			_cannot_ be created unless NM is started with --enable-test-devices.

	* src/NetworkManagerDbus.[ch]
		- New "getLinkActive" method for devices
		- New "setLinkActive" method for devices (only works on test devices)
		- New "createTestDevice" method on NetworkManager object to create a test
			device of a specified type (ie wired, wireless).  UDI is created from
			scratch, as is the interface name.  Only works when NM is started with
			--enable-test-devices switch.
		- New "removeTestDevice" method on NetworkManager object which removes a
			test device.  Only works when NM is started with --enable-test-devices

	* src/NetworkManagerDevice.[ch]
		- Logic to facilitate test devices.  Add variables to NMDevice struct to indicate
			whether a device is a test device or not, and what its link status is.
		- Deal with test devices in most functions.  For those that work directly on hardware
			special-case test devices.
		- (nm_device_new): don't create a test device if test devices weren't enabled on the
			command-line.
		- (nm_device_update_link_active): split out logic for wired and wireless device link
			checking to separate functions to facilitate test device link checking.
		- (nm_device_set_enc_key): Since some drivers for wireless cards are daft and
			don't make a distinction between System Authentication and Encryption
			(namely Cisco aironet), we use Open System auth when setting a WEP key
			on the card.  We don't deal with Shared Key auth yet.
		- (nm_device_activation_worker): split the activation cancel check logic out into
			a separate routine nm_device_activation_cancel_if_needed()
		- (nm_device_activation_signal_cancel): rename from nm_device_activation_cancel()
		- (nm_device_fake_ap_list): Test wireless devices obviously cannot scan, so create
			a list of fake access points that they can "see"
		- (nm_device_is_test_device): return whether or not a device is a test device

	* src/NetworkManagerPolicy.c
		- (nm_policy_get_best_device): attempt to deal with wireless network selection,
			previously if you "locked"/forced NM to use a wireless device but then
			selected a wireless network for NM to use, it would switch to a wired device.
			So, if the active device is wireless and it has a "forced" best AP, use it
			if the "forced" best AP is still valid
		- (nm_state_modification_monitor): deal with NULL best devices, for example
			there were no usable network devices, or the last one was removed

	* src/backends/NetworkManager*.c
		- Deal with test devices, mostly just return success for operations like getting
			a DHCP address

	* test/nmtestdevices.c
		- Test tool to create/remove/link-switch test devices


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@112 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2004-08-31 16:09:15 +00:00