gnome-main-menu r532 - in trunk: . main-menu/src
- From: sreeves svn gnome org
- To: svn-commits-list gnome org
- Subject: gnome-main-menu r532 - in trunk: . main-menu/src
- Date: Mon, 29 Dec 2008 23:03:39 +0000 (UTC)
Author: sreeves
Date: Mon Dec 29 23:03:39 2008
New Revision: 532
URL: http://svn.gnome.org/viewvc/gnome-main-menu?rev=532&view=rev
Log:
match the NM API change
Modified:
trunk/ChangeLog
trunk/main-menu/src/network-status-agent.c
Modified: trunk/main-menu/src/network-status-agent.c
==============================================================================
--- trunk/main-menu/src/network-status-agent.c (original)
+++ trunk/main-menu/src/network-status-agent.c Mon Dec 29 23:03:39 2008
@@ -21,12 +21,12 @@
#include "network-status-agent.h"
#include <string.h>
-#include <libnm-glib/nm-client.h>
+#include <nm-client.h>
#include <NetworkManager.h>
-#include <libnm-glib/nm-device-wifi.h>
-#include <libnm-glib/nm-device-ethernet.h>
-#include <libnm-glib/nm-gsm-device.h>
-#include <libnm-glib/nm-cdma-device.h>
+#include <nm-device-wifi.h>
+#include <nm-device-ethernet.h>
+#include <nm-gsm-device.h>
+#include <nm-cdma-device.h>
#include <nm-setting-ip4-config.h>
#include <nm-utils.h>
#include <arpa/inet.h>
@@ -201,8 +201,8 @@
NetworkStatusInfo *info = g_object_new (NETWORK_STATUS_INFO_TYPE, NULL);
const GArray *array;
const GSList *addresses;
- NMSettingIP4Address *def_addr;
- guint32 hostmask, network, bcast;
+ 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));
@@ -217,14 +217,16 @@
if (addresses) {
def_addr = addresses->data;
- info->ip4_addr = ip4_address_as_string (def_addr->address);
- info->subnet_mask = ip4_address_as_string (nm_utils_ip4_prefix_to_netmask (def_addr->prefix));
- info->route = ip4_address_as_string (def_addr->gateway);
-
- network = ntohl (def_addr->address) & ntohl (nm_utils_ip4_prefix_to_netmask (def_addr->prefix));
- hostmask = ~ntohl (nm_utils_ip4_prefix_to_netmask (def_addr->prefix));
+ 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->broadcast = ip4_address_as_string (bcast);
+
+ 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;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]