Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Evergreen:11.1:Test
gnome-main-menu
gnome-main-menu-bnc449841-nm-status-after-resum...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File gnome-main-menu-bnc449841-nm-status-after-resume.patch of Package gnome-main-menu
--- main-menu/src/network-status-agent.c.org 2009-01-01 14:09:52.000000000 +1100 +++ main-menu/src/network-status-agent.c 2009-01-01 14:10:08.000000000 +1100 @@ -200,45 +200,12 @@ nm_get_device_info (NetworkStatusAgent * { NetworkStatusInfo *info = g_object_new (NETWORK_STATUS_INFO_TYPE, NULL); const GArray *array; - const GSList *addresses; - NMIP4Address *def_addr; - guint32 address, netmask, hostmask, network, bcast; info->iface = g_strdup (nm_device_get_iface (device)); info->driver = g_strdup (nm_device_get_driver (device)); info->active = (nm_device_get_state (device) == NM_DEVICE_STATE_ACTIVATED) ? TRUE : FALSE; if (! info->active) return info; - NMIP4Config * cfg = nm_device_get_ip4_config (device); - if(! cfg) - return info; - - addresses = nm_ip4_config_get_addresses (cfg); - if (addresses) { - def_addr = addresses->data; - - address = nm_ip4_address_get_address (def_addr); - netmask = nm_utils_ip4_prefix_to_netmask (nm_ip4_address_get_prefix (def_addr)); - network = ntohl (address) & ntohl (netmask); - hostmask = ~ntohl (netmask); - bcast = htonl (network | hostmask); - - info->ip4_addr = ip4_address_as_string (address); - info->subnet_mask = ip4_address_as_string (netmask); - info->route = ip4_address_as_string (nm_ip4_address_get_gateway (def_addr)); - info->broadcast = ip4_address_as_string (bcast); - } - - info->primary_dns = NULL; - info->secondary_dns = NULL; - array = nm_ip4_config_get_nameservers (cfg); - if (array) - { - if (array->len > 0) - info->primary_dns = ip4_address_as_string (g_array_index (array, guint32, 0)); - if (array->len > 1) - info->secondary_dns = ip4_address_as_string (g_array_index (array, guint32, 1)); - } if (NM_IS_DEVICE_WIFI(device)) { --- main-menu/src/network-status-info.c.org 2009-01-01 14:15:37.000000000 +1100 +++ main-menu/src/network-status-info.c 2009-01-01 14:15:40.000000000 +1100 @@ -40,12 +40,6 @@ network_status_info_init (NetworkStatusI info->essid = NULL; info->driver = NULL; - info->ip4_addr = NULL; - info->broadcast = NULL; - info->subnet_mask = NULL; - info->route = NULL; - info->primary_dns = NULL; - info->secondary_dns = NULL; info->speed_mbs = -1; info->hw_addr = NULL; } @@ -60,18 +54,6 @@ network_status_info_finalize (GObject * g_free (info->essid); if (info->driver) g_free (info->driver); - if (info->ip4_addr) - g_free (info->ip4_addr); - if (info->broadcast) - g_free (info->broadcast); - if (info->subnet_mask) - g_free (info->subnet_mask); - if (info->route) - g_free (info->route); - if (info->primary_dns) - g_free (info->primary_dns); - if (info->secondary_dns) - g_free (info->secondary_dns); if (info->hw_addr) g_free (info->hw_addr);
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor