diff options
| author | Michael Biebl <biebl@teco.edu> | 2006-05-05 21:40:48 +0000 |
|---|---|---|
| committer | Michael Biebl <biebl@teco.edu> | 2006-05-05 21:40:48 +0000 |
| commit | 5e049c924e41f2099c65be0cf9e6e441bdd84dc2 (patch) | |
| tree | a723fb5cb7e6dd4628e210bd7d66e77d4cb483b1 /debian/patches | |
| parent | 44a31b5773ec83522ba8047b0cd19ef975808e42 (diff) | |
Lots of integration work. NM behaves like a good citizen now and is ready for "testing".
git-svn-id: svn+ssh://svn.debian.org/svn/pkg-utopia/packages/unstable/networkmanager@815 ceb527fc-18e6-0310-9fe2-813c157c29e7
Diffstat (limited to 'debian/patches')
| -rw-r--r-- | debian/patches/08-disabled_devices.patch | 52 | ||||
| -rw-r--r-- | debian/patches/09-nm_bad_mutex_free.patch | 69 |
2 files changed, 121 insertions, 0 deletions
diff --git a/debian/patches/08-disabled_devices.patch b/debian/patches/08-disabled_devices.patch new file mode 100644 index 00000000..9ffe22ce --- /dev/null +++ b/debian/patches/08-disabled_devices.patch @@ -0,0 +1,52 @@ +--- src/backends/NetworkManagerDebian.c.orig 2006-05-05 19:59:18.000000000 +0200 ++++ src/backends/NetworkManagerDebian.c 2006-05-05 20:04:34.000000000 +0200 +@@ -521,7 +521,48 @@ + */ + gboolean nm_system_device_get_disabled (NMDevice *dev) + { +- return FALSE; ++ const char *iface; ++ if_block *curr_device, *curr_b; ++ if_data *curr_d; ++ gboolean blacklist = TRUE; ++ ++ g_return_val_if_fail (dev != NULL, TRUE); ++ ++ iface = nm_device_get_iface (dev); ++ ++ ifparser_init (); ++ ++ /* If the interface isn't listed in /etc/network/interfaces then ++ * it's considered okay to control it. ++ */ ++ curr_device = ifparser_getif (iface); ++ if (curr_device == NULL) { ++ blacklist = FALSE; ++ goto out; ++ } ++ ++ /* If the interface is listed and isn't marked "auto" then it's ++ * definitely not okay to control it. ++ */ ++ for (curr_b = ifparser_getfirst(); curr_b; curr_b = curr_b->next) { ++ if (!strcmp (curr_b->type, "auto") ++ && !strcmp (curr_b->name, iface)) ++ blacklist = FALSE; ++ } ++ ++ /* If the interface has no options other than just "inet dhcp" ++ * it's probably ok to fiddle with it. ++ */ ++ for (curr_d = curr_device->info; curr_d; curr_d = curr_d->next) { ++ if (strcmp (curr_d->key, "inet") ++ || strcmp (curr_d->data, "dhcp")) ++ blacklist = TRUE; ++ } ++ ++out: ++ ifparser_destroy (); ++ ++ return blacklist; + } + + diff --git a/debian/patches/09-nm_bad_mutex_free.patch b/debian/patches/09-nm_bad_mutex_free.patch new file mode 100644 index 00000000..9da4cce0 --- /dev/null +++ b/debian/patches/09-nm_bad_mutex_free.patch @@ -0,0 +1,69 @@ +--- network-manager-0.6.2.orig/src/nm-device-802-11-wireless.c 2006-05-05 02:13:37.000000000 -0500 ++++ network-manager-0.6.2/src/nm-device-802-11-wireless.c 2006-05-05 02:20:23.000000000 -0500 +@@ -60,7 +60,7 @@ + + struct _NMDevice80211WirelessPrivate + { +- gboolean dispose_has_run; ++ gboolean is_initialized; + + struct ether_addr hw_addr; + +@@ -242,7 +242,7 @@ + nm_device_802_11_wireless_init (NMDevice80211Wireless * self) + { + self->priv = NM_DEVICE_802_11_WIRELESS_GET_PRIVATE (self); +- self->priv->dispose_has_run = FALSE; ++ self->priv->is_initialized = FALSE; + + memset (&(self->priv->hw_addr), 0, sizeof (struct ether_addr)); + self->priv->supplicant.pid = -1; +@@ -256,6 +256,7 @@ + guint32 caps; + NMSock * sk; + ++ self->priv->is_initialized = TRUE; + self->priv->scan_mutex = g_mutex_new (); + nm_register_mutex_desc (self->priv->scan_mutex, "Scan Mutex"); + +@@ -2988,24 +2989,22 @@ + NMDevice80211WirelessClass * klass = NM_DEVICE_802_11_WIRELESS_GET_CLASS (object); + NMDeviceClass * parent_class; + +- if (self->priv->dispose_has_run) +- /* If dispose did already run, return. */ +- return; +- +- /* Make sure dispose does not run twice. */ +- self->priv->dispose_has_run = TRUE; +- +- /* +- * In dispose, you are supposed to free all types referenced from this +- * object which might themselves hold a reference to self. Generally, +- * the most simple solution is to unref all members on which you own a +- * reference. +- */ +- +- nm_device_802_11_wireless_ap_list_clear (self); +- if (self->priv->ap_list) +- nm_ap_list_unref (self->priv->ap_list); +- g_mutex_free (self->priv->scan_mutex); ++ /* Only do this part of the cleanup if the object is initialized */ ++ if (self->priv->is_initialized) { ++ self->priv->is_initialized = FALSE; ++ ++ /* ++ * In dispose, you are supposed to free all types referenced from this ++ * object which might themselves hold a reference to self. Generally, ++ * the most simple solution is to unref all members on which you own a ++ * reference. ++ */ ++ ++ nm_device_802_11_wireless_ap_list_clear (self); ++ if (self->priv->ap_list) ++ nm_ap_list_unref (self->priv->ap_list); ++ g_mutex_free (self->priv->scan_mutex); ++ } + + /* Chain up to the parent class */ + parent_class = NM_DEVICE_CLASS (g_type_class_peek_parent (klass)); |