rpms/NetworkManager/F-9 nm-param-spec-compare.patch, NONE, 1.1 NetworkManager.spec, 1.240, 1.241
Daniel Williams
dcbw at fedoraproject.org
Wed Oct 1 21:49:16 UTC 2008
- Previous message: rpms/NetworkManager/devel nm-param-spec-compare.patch, NONE, 1.1 NetworkManager.spec, 1.239, 1.240
- Next message: rpms/anaconda/F-9 anaconda-11.4.0.82-bz445974.patch, NONE, 1.1 anaconda-11.4.0.82-newyum.patch, NONE, 1.1 anaconda-11.4.0.82-no-explicit-path.patch, NONE, 1.1 anaconda-11.4.0.82-old-yumdownloader.patch, NONE, 1.1 anaconda-11.4.0.82-updated-oriya.patch, NONE, 1.1 anaconda.spec, 1.684, 1.685
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: dcbw
Update of /cvs/pkgs/rpms/NetworkManager/F-9
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv27870
Modified Files:
NetworkManager.spec
Added Files:
nm-param-spec-compare.patch
Log Message:
* Wed Oct 1 2008 Dan Williams <dcbw at redhat.com> - 1:0.7.0-0.11.svn4022.4
- Fix connection comparison that could cause changes to get overwritten (rh #464417)
nm-param-spec-compare.patch:
--- NEW FILE nm-param-spec-compare.patch ---
2008-10-01 Dan Williams <dcbw at redhat.com>
Fix setting value comparison issue that caused some settings to look the
same when they were really different (rh #464417)
* libnm-util/nm-param-spec-specialized.c
- (type_is_fixed_size): return fundamental size of the fixed type too
- (nm_gvalues_compare_collection): use the fundamental fixed type size
in the comparison so that the _entire_ fixed type collection gets
compared rather than just the first 'len1' bytes
diff -up NetworkManager-0.7.0/libnm-util/nm-param-spec-specialized.c.compare-fix NetworkManager-0.7.0/libnm-util/nm-param-spec-specialized.c
--- NetworkManager-0.7.0/libnm-util/nm-param-spec-specialized.c.compare-fix 2008-10-01 17:41:41.000000000 -0400
+++ NetworkManager-0.7.0/libnm-util/nm-param-spec-specialized.c 2008-10-01 17:42:05.000000000 -0400
@@ -39,20 +39,41 @@ struct _NMParamSpecSpecialized {
static gint nm_gvalues_compare (const GValue *value1, const GValue *value2);
static gboolean
-type_is_fixed_size (GType type)
+type_is_fixed_size (GType type, gsize *tsize)
{
switch (type) {
case G_TYPE_CHAR:
+ if (tsize) *tsize = sizeof (char);
+ return TRUE;
case G_TYPE_UCHAR:
+ if (tsize) *tsize = sizeof (guchar);
+ return TRUE;
case G_TYPE_BOOLEAN:
+ if (tsize) *tsize = sizeof (gboolean);
+ return TRUE;
case G_TYPE_LONG:
+ if (tsize) *tsize = sizeof (glong);
+ return TRUE;
case G_TYPE_ULONG:
+ if (tsize) *tsize = sizeof (gulong);
+ return TRUE;
case G_TYPE_INT:
+ if (tsize) *tsize = sizeof (gint);
+ return TRUE;
case G_TYPE_UINT:
+ if (tsize) *tsize = sizeof (guint);
+ return TRUE;
case G_TYPE_INT64:
+ if (tsize) *tsize = sizeof (gint64);
+ return TRUE;
case G_TYPE_UINT64:
+ if (tsize) *tsize = sizeof (guint64);
+ return TRUE;
case G_TYPE_FLOAT:
+ if (tsize) *tsize = sizeof (gfloat);
+ return TRUE;
case G_TYPE_DOUBLE:
+ if (tsize) *tsize = sizeof (gdouble);
return TRUE;
default:
return FALSE;
@@ -232,8 +253,9 @@ nm_gvalues_compare_collection (const GVa
guint len1;
guint len2;
GType value_type = dbus_g_type_get_collection_specialization (G_VALUE_TYPE (value1));
+ gsize element_size = 0;
- if (type_is_fixed_size (value_type)) {
+ if (type_is_fixed_size (value_type, &element_size)) {
gpointer data1 = NULL;
gpointer data2 = NULL;
@@ -243,7 +265,7 @@ nm_gvalues_compare_collection (const GVa
if (len1 != len2)
ret = len1 < len2 ? -1 : len1 > len2;
else
- ret = memcmp (data1, data2, len1);
+ ret = memcmp (data1, data2, len1 * element_size);
} else {
GSList *list1 = NULL;
GSList *list2 = NULL;
@@ -372,8 +394,7 @@ nm_gvalues_compare (const GValue *value1
if (type1 != type2)
return type1 < type2 ? -1 : type1 > type2;
-
- if (type_is_fixed_size (type1))
+ if (type_is_fixed_size (type1, NULL))
ret = nm_gvalues_compare_fixed (value1, value2);
else if (type1 == G_TYPE_STRING)
ret = nm_gvalues_compare_string (value1, value2);
Index: NetworkManager.spec
===================================================================
RCS file: /cvs/pkgs/rpms/NetworkManager/F-9/NetworkManager.spec,v
retrieving revision 1.240
retrieving revision 1.241
diff -u -r1.240 -r1.241
--- NetworkManager.spec 1 Oct 2008 12:53:10 -0000 1.240
+++ NetworkManager.spec 1 Oct 2008 21:48:46 -0000 1.241
@@ -16,7 +16,7 @@
Summary: Network connection manager and user applications
Epoch: 1
Version: 0.7.0
-Release: 0.11.%{snapshot}.3%{?dist}
+Release: 0.11.%{snapshot}.4%{?dist}
Group: System Environment/Base
License: GPLv2+
URL: http://www.gnome.org/projects/NetworkManager/
@@ -31,6 +31,7 @@
Patch6: wpa-adhoc-fix.patch
Patch7: crypto-init.patch
Patch8: nm-vpn-fixes-r900-r901.patch
+Patch9: nm-param-spec-compare.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
PreReq: chkconfig
@@ -159,6 +160,7 @@
%patch6 -p1 -b .wpa-adhoc-fix
%patch7 -p1 -b .crypto-init
%patch8 -p1 -b .vpn-fixes
+%patch9 -p1 -b .paramspec-compare
%build
autoreconf -i
@@ -313,6 +315,9 @@
%{_datadir}/gtk-doc/html/libnm-glib/
%changelog
+* Wed Oct 1 2008 Dan Williams <dcbw at redhat.com> - 1:0.7.0-0.11.svn4022.4
+- Fix connection comparison that could cause changes to get overwritten (rh #464417)
+
* Tue Sep 30 2008 Dan Williams <dcbw at redhat.com> - 1:0.7.0-0.11.svn4022.3
- Fix handling of VPN settings on upgrade (rh #460730, bgo #553465)
- Previous message: rpms/NetworkManager/devel nm-param-spec-compare.patch, NONE, 1.1 NetworkManager.spec, 1.239, 1.240
- Next message: rpms/anaconda/F-9 anaconda-11.4.0.82-bz445974.patch, NONE, 1.1 anaconda-11.4.0.82-newyum.patch, NONE, 1.1 anaconda-11.4.0.82-no-explicit-path.patch, NONE, 1.1 anaconda-11.4.0.82-old-yumdownloader.patch, NONE, 1.1 anaconda-11.4.0.82-updated-oriya.patch, NONE, 1.1 anaconda.spec, 1.684, 1.685
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the scm-commits
mailing list