~ubuntu-branches/ubuntu/trusty/gnome-main-menu/trusty

« back to all changes in this revision

Viewing changes to debian/patches/30_nm07.patch

  • Committer: Bazaar Package Importer
  • Author(s): Alexander Sack
  • Date: 2009-01-19 10:01:45 UTC
  • mfrom: (1.1.4 upstream)
  • Revision ID: james.westby@ubuntu.com-20090119100145-luwp9gta8xofnf6u
Tags: 0.9.12+dfsg-0ubuntu1
* New upstream release 0.9.12
  Scott Reeves  <sreeves@novell.com>:
  - Fix for BGO#562985 - network status not shown on resume
  - Fix g_object_unref G_IS_OBJECT assertions.
  - Clean up .desktop files - BNC#444138
  - Fix BNC#447550 - translations not updating when changing locale
  - Fix up the entire flow of how the system-items.xbel is handled
  - Add a trivial launcher of the panel "Run Application" dialog for 
    optional inclusion in the system area
  - Patch from Tambet to match the NetworkManager API change
  - post release bump to 0.9.12
  Kjartan Maraas  <kmaraas@gnome.org>:
  - Add libgnomeui to LIBSLAB_CFLAGS to make it build.
  Federico Mena Quintero  <federico@novell.com>:
  - Some code cleanup
* debian/patches/02_add_libgnomeui.patch,
  debian/patches/30_nm07.patch, debian/patches/series:
  - remove patches superseeded in upstream tree

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
---
2
 
 main-menu/src/network-status-agent.c |   13 ++++++-------
3
 
 1 file changed, 6 insertions(+), 7 deletions(-)
4
 
 
5
 
Index: gnome-main-menu-0.9.11+dfsg/main-menu/src/network-status-agent.c
6
 
===================================================================
7
 
--- gnome-main-menu-0.9.11+dfsg.orig/main-menu/src/network-status-agent.c
8
 
+++ gnome-main-menu-0.9.11+dfsg/main-menu/src/network-status-agent.c
9
 
@@ -196,38 +196,37 @@
10
 
 }
11
 
 
12
 
 static NetworkStatusInfo *
13
 
 nm_get_device_info (NetworkStatusAgent * agent, NMDevice * device)
14
 
 {
15
 
        NetworkStatusInfo *info = g_object_new (NETWORK_STATUS_INFO_TYPE, NULL);
16
 
        const GArray *array;
17
 
        const GSList *addresses;
18
 
-       NMSettingIP4Address *def_addr;
19
 
+       NMIP4Address *def_addr;
20
 
        guint32 hostmask, network, bcast;
21
 
 
22
 
        info->iface = g_strdup (nm_device_get_iface (device));
23
 
        info->driver = g_strdup (nm_device_get_driver (device));
24
 
        info->active = (nm_device_get_state (device) == NM_DEVICE_STATE_ACTIVATED) ? TRUE : FALSE;
25
 
        if (! info->active)
26
 
                return info;
27
 
        NMIP4Config * cfg = nm_device_get_ip4_config (device);
28
 
        if(! cfg)
29
 
                return info;
30
 
 
31
 
        addresses = nm_ip4_config_get_addresses (cfg);
32
 
        if (addresses) {
33
 
                def_addr = addresses->data;
34
 
+               info->ip4_addr = ip4_address_as_string (nm_ip4_address_get_address (def_addr));
35
 
+               info->subnet_mask = ip4_address_as_string (nm_utils_ip4_prefix_to_netmask (nm_ip4_address_get_prefix (def_addr)));
36
 
+               info->route = ip4_address_as_string (nm_ip4_address_get_gateway(def_addr));
37
 
 
38
 
-               info->ip4_addr = ip4_address_as_string (def_addr->address);
39
 
-               info->subnet_mask = ip4_address_as_string (nm_utils_ip4_prefix_to_netmask (def_addr->prefix));
40
 
-               info->route = ip4_address_as_string (def_addr->gateway);
41
 
-
42
 
-               network = ntohl (def_addr->address) & ntohl (nm_utils_ip4_prefix_to_netmask (def_addr->prefix));
43
 
-               hostmask = ~ntohl (nm_utils_ip4_prefix_to_netmask (def_addr->prefix));
44
 
+               network = ntohl (nm_ip4_address_get_address (def_addr)) & ntohl (nm_utils_ip4_prefix_to_netmask (nm_ip4_address_get_prefix (def_addr)));
45
 
+               hostmask = ~ntohl (nm_utils_ip4_prefix_to_netmask (nm_ip4_address_get_prefix (def_addr)));
46
 
                bcast = htonl (network | hostmask);
47
 
                info->broadcast = ip4_address_as_string (bcast);
48
 
        }
49
 
 
50
 
        info->primary_dns = NULL;
51
 
        info->secondary_dns = NULL;
52
 
        array = nm_ip4_config_get_nameservers (cfg);
53
 
        if (array)