Re: Problem (and the patch) when having multiple search domains on a network.



On Mon, 2005-02-14 at 09:31 -0500, Dan Williams wrote:
> It should be in CVS already.  Has been for a bit, perhaps a new RPM just
> didn't get pushed or something...

I still can't get it on the public gnome CVS, and I have 1.276
ChangeLog. I attached the patch with the resolved conflict, against the
current cvs HEAD.

BTW, the recently introduced warnings break the default CVS compilation
(-Werror). You can find the cleanup patch in the attachment. 

I also added maintainer mode patch and the Croatian locale to this
email.

Regards,
-- 
Tomislav Vujec
Manager, Client Development
Red Hat  Otto-Hahn-Straße 20  85609 München-Dornach
Tel +49 89 205071 212 Fax +49 89 205071 111 Cell. +49 172 623 1214
2005-02-14  Tomislav Vujec  <tvujec redhat com>

	* src/nm-dbus-dhcp.c
	  test/nm-dhcp-opt-test.c
		- Clean up warnings to enable cvs tree compilation.

Index: src/nm-dbus-dhcp.c
===================================================================
RCS file: /cvs/gnome/NetworkManager/src/nm-dbus-dhcp.c,v
retrieving revision 1.1
diff -u -r1.1 nm-dbus-dhcp.c
--- src/nm-dbus-dhcp.c	13 Feb 2005 22:10:03 -0000	1.1
+++ src/nm-dbus-dhcp.c	14 Feb 2005 14:52:59 -0000
@@ -46,6 +46,7 @@
 			return DBUS_TYPE_BYTE;
 	}
 	g_assert_not_reached();
+	return 0;
 }
 
 #define DBUS_REPLY_BYTYPE(Dtype, Ctype) do {																\
Index: test/nm-dhcp-opt-test.c
===================================================================
RCS file: /cvs/gnome/NetworkManager/test/nm-dhcp-opt-test.c,v
retrieving revision 1.1
diff -u -r1.1 nm-dhcp-opt-test.c
--- test/nm-dhcp-opt-test.c	13 Feb 2005 22:10:03 -0000	1.1
+++ test/nm-dhcp-opt-test.c	14 Feb 2005 14:53:00 -0000
@@ -57,6 +57,7 @@
 			return "string";
 	}
 	g_assert_not_reached ();
+	return 0;
 }
 
 
@@ -190,8 +191,8 @@
 	int			*int32 = NULL;
 	gboolean		*bool = NULL;
 	unsigned char	*byte = NULL;
-	void			*item;
-	char			*method;
+	void			*item = NULL;
+	char			*method = NULL;
 	int			 ret;
 	const char	*name = NULL;
 
@@ -258,7 +259,7 @@
 	unsigned char	 byte;
 	char			*string = NULL;
 	void			*item = NULL;
-	char			*method;
+	char			*method = NULL;
 	int			 ret;
 	const char	*name = NULL;
 
2005-02-14  Tomislav Vujec  <tvujec redhat com>

        * configure.in
          po/hr.po
                - Add the Croatian locale.

Index: configure.in
===================================================================
RCS file: /cvs/gnome/NetworkManager/configure.in,v
retrieving revision 1.60
diff -u -r1.60 configure.in
--- configure.in	13 Feb 2005 22:10:02 -0000	1.60
+++ configure.in	14 Feb 2005 15:10:42 -0000
@@ -36,7 +36,7 @@
 GETTEXT_PACKAGE=NetworkManager
 AC_SUBST(GETTEXT_PACKAGE)
 AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [Gettext package])
-ALL_LINGUAS="bs cs da de el en_CA es gu ja nb nl no pa pt_BR sk sq sv wa zh_CN"
+ALL_LINGUAS="bs cs da de el en_CA es gu hr ja nb nl no pa pt_BR sk sq sv wa zh_CN"
 AM_GLIB_GNU_GETTEXT
 
 AC_ARG_WITH(distro, AC_HELP_STRING([--with-distro=DISTRO], [Specify the Linux distribution to target: One of redhat, gentoo, debian, or slackware]))
Index: po/hr.po
===================================================================
RCS file: po/hr.po
diff -N po/hr.po
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ po/hr.po	1 Jan 1970 00:00:00 -0000
@@ -0,0 +1,220 @@
+# NetworkManager
+# Copyright (C) Red Hat, Inc.
+# This file is distributed under the same license as the NetworkManager package.
+# Tomislav Vujec <tvujec redhat com>, 2005.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: NetworkManager \n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2005-02-04 17:28+0100\n"
+"PO-Revision-Date: 2005-02-04 01:08+0100\n"
+"Last-Translator: Tomislav Vujec <tvujec redhat com>\n"
+"Language-Team: Croatian <hr li org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+
+#: info-daemon/networks.glade:11
+msgid "Modify Wireless Networks"
+msgstr "Postavke bežičnih mreža"
+
+#: info-daemon/networks.glade:92
+msgid "<span weight=\"bold\">Wireless Networks:</span>"
+msgstr "<span weight=\"bold\">Bežične mreže:</span>"
+
+#: info-daemon/passphrase.glade:9
+msgid "Wireless Network Key Required"
+msgstr "Potreban je ključ bežične mreže"
+
+#: info-daemon/passphrase.glade:52
+msgid "_Login to Network"
+msgstr "_Prijava na mrežu"
+
+#: info-daemon/passphrase.glade:100
+msgid ""
+"<span weight=\"bold\" size=\"larger\">Passphrase Required by Wireless "
+"Network</span>\n"
+"\n"
+"A passphrase or encryption key is required to access the wireless network '%"
+"s'."
+msgstr ""
+"<span weight=\"bold\" size=\"larger\">Potrebna je lozinka za bežičnu mrežu</"
+"span>\n"
+"\n"
+"Za pristup mreži '%s', potrebna je lozinka ili ključ."
+
+#: info-daemon/passphrase.glade:129 panel-applet/essid.glade:246
+msgid "Key Type:"
+msgstr "Tip ključa:"
+
+#: info-daemon/passphrase.glade:150 panel-applet/essid.glade:315
+msgid ""
+"128-bit Passphrase (WEP)\n"
+"Ascii Key (WEP)\n"
+"Hex Key (WEP)"
+msgstr ""
+"128-bitna lozinka (WEP)\n"
+"Slovčani ključ (WEP)\n"
+"Heksadecimalni ključ (WEP)"
+
+#: info-daemon/passphrase.glade:181
+#: info-daemon/NetworkManagerInfoPassphraseDialog.c:139
+#: panel-applet/NMWirelessAppletOtherNetworkDialog.c:149
+#: panel-applet/essid.glade:270
+msgid "Passphrase:"
+msgstr "Lozinka:"
+
+#: info-daemon/passphrase.glade:209 panel-applet/essid.glade:203
+#: panel-applet/essid.glade:300
+msgid "*"
+msgstr "*"
+
+#: info-daemon/NetworkManagerInfoPassphraseDialog.c:142
+#: panel-applet/NMWirelessAppletOtherNetworkDialog.c:152
+msgid "Ascii Key:"
+msgstr "Slovčani ključ"
+
+#: info-daemon/NetworkManagerInfoPassphraseDialog.c:145
+#: panel-applet/NMWirelessAppletOtherNetworkDialog.c:155
+msgid "Hex Key:"
+msgstr "Heksadecimalni ključ"
+
+#: info-daemon/NetworkManagerInfoVPN.c:157
+#, c-format
+msgid "You must log in to access the private network %s"
+msgstr "Prijava je potrebna za pristup na mrežu %s"
+
+#: panel-applet/NMWirelessApplet.c:313
+msgid "No network connection"
+msgstr "Nema spoja na mrežu"
+
+#: panel-applet/NMWirelessApplet.c:318
+msgid "Wired network connection"
+msgstr "Spoj na žičanu mrežu"
+
+#: panel-applet/NMWirelessApplet.c:323
+msgid "Connecting to a wired network..."
+msgstr "Spajanje na žičanu mrežu..."
+
+#: panel-applet/NMWirelessApplet.c:332
+msgid "Connected to an Ad-Hoc wireless network"
+msgstr "Spoj na Ad-Hoc bežičnu mrežu"
+
+#: panel-applet/NMWirelessApplet.c:346
+#, c-format
+msgid "Wireless network connection to '%s' (%d%%)"
+msgstr "Spoj na bežičnu mrežu '%s' (%d%%)"
+
+#: panel-applet/NMWirelessApplet.c:351
+msgid "Wireless network connection"
+msgstr "Spoj na bežičnu mrežu"
+
+#: panel-applet/NMWirelessApplet.c:356
+#, c-format
+msgid "Connecting to wireless network '%s'..."
+msgstr "Spajanje na bežičnu mrežu '%s'..."
+
+#: panel-applet/NMWirelessApplet.c:362
+msgid "NetworkManager is not running"
+msgstr "NetworkManager nije pokrenut"
+
+#: panel-applet/NMWirelessApplet.c:367
+msgid "Scanning for wireless networks..."
+msgstr "Potraga za bežičnim mrežama..."
+
+#: panel-applet/NMWirelessApplet.c:690
+msgid "Other Wireless Networks..."
+msgstr "Ostale bežične mreže..."
+
+#: panel-applet/NMWirelessApplet.c:711
+msgid "Create new Wireless Network..."
+msgstr "Stvori novu bečičnu mrežu..."
+
+#: panel-applet/NMWirelessApplet.c:821
+msgid "No network devices have been found"
+msgstr "Nema mrežnih uređaja"
+
+#: panel-applet/NMWirelessApplet.c:939
+msgid "NetworkManager is not running..."
+msgstr "NetworkManager nije pokrenut..."
+
+#: panel-applet/NMWirelessAppletOtherNetworkDialog.c:228
+msgid "Create new wireless network"
+msgstr "Stvori novu bečičnu mrežu"
+
+#: panel-applet/NMWirelessAppletOtherNetworkDialog.c:229
+msgid ""
+"Enter the ESSID and security settings of the wireless network you wish to "
+"create."
+msgstr "Unesi ESSID i sigurnosne postavke bežične mreže koju treba stvoriti."
+
+#: panel-applet/NMWirelessAppletOtherNetworkDialog.c:234
+msgid "Custom wireless network"
+msgstr "Posebna bežična mreža"
+
+#: panel-applet/NMWirelessAppletOtherNetworkDialog.c:235
+msgid "Enter the ESSID of the wireless network to which you wish to connect."
+msgstr ""
+"Unesi ESSID i sigurnosne postavke bežične mreže na koju se treba spojiti."
+
+#. Reuse the above string to make the translators less angry.
+#: panel-applet/NMWirelessAppletOtherNetworkDialog.c:316
+#: panel-applet/NMWirelessAppletOtherNetworkDialog.c:325
+msgid ""
+"The NetworkManager Applet could not find some required resources (the glade "
+"file was not found)."
+msgstr ""
+"NetworkManager ne može naći potrebne datoteke (glade datoteka nije "
+"pronađena)."
+
+#: panel-applet/essid.glade:53
+msgid "C_onnect"
+msgstr "_Spoji se"
+
+#: panel-applet/essid.glade:132
+msgid "Wireless _Adaptor:"
+msgstr "Bežični _uređaj:"
+
+#: panel-applet/essid.glade:172
+msgid "Wireless _Network:"
+msgstr "Bežična _mreža:"
+
+#: panel-applet/essid.glade:337
+msgid "Connect with encryption enabled"
+msgstr "Spoji se sa enkripcijom"
+
+#: panel-applet/menu-info.c:109
+#, c-format
+msgid "Wired Network (%s)"
+msgstr "Žičana mreža (%s)"
+
+#: panel-applet/menu-info.c:111
+msgid "Wired Network"
+msgstr "Žičana mreža"
+
+#: panel-applet/menu-info.c:177
+#, c-format
+msgid "Wireless Network (%s)"
+msgid_plural "Wireless Networks (%s)"
+msgstr[0] "Bežična mreža (%s)"
+msgstr[1] "Bežične mreže (%s)"
+
+#: panel-applet/menu-info.c:179
+msgid "Wireless Network"
+msgid_plural "Wireless Networks"
+msgstr[0] "Bežična mreža"
+msgstr[1] "Bežične mreže"
+
+#: panel-applet/menu-info.c:316
+msgid " (invalid Unicode)"
+msgstr " (greška u unicodu)"
+
+#: examples/python/systray/eggtrayicon.c:111
+msgid "Orientation"
+msgstr "Orjentacija"
+
+#: examples/python/systray/eggtrayicon.c:112
+msgid "The orientation of the tray."
+msgstr "Orjentacija ladice."
2005-02-14  Tomislav Vujec  <tvujec redhat com>

        * configure.in
                - Add the maintainer mode switch.

Index: configure.in
===================================================================
RCS file: /cvs/gnome/NetworkManager/configure.in,v
retrieving revision 1.60
diff -u -r1.60 configure.in
--- configure.in	13 Feb 2005 22:10:02 -0000	1.60
+++ configure.in	14 Feb 2005 15:12:54 -0000
@@ -2,7 +2,7 @@
 
 AC_INIT(NetworkManager, 0.3.3, dcbw redhat com, NetworkManager)
 AM_INIT_AUTOMAKE([subdir-objects])
-
+AM_MAINTAINER_MODE
 AM_CONFIG_HEADER(config.h)
 
 dnl
Index: src/NetworkManagerDHCP.c
===================================================================
RCS file: /cvs/gnome/NetworkManager/src/NetworkManagerDHCP.c,v
retrieving revision 1.13
diff -u -r1.13 NetworkManagerDHCP.c
--- src/NetworkManagerDHCP.c	13 Feb 2005 22:10:03 -0000	1.13
+++ src/NetworkManagerDHCP.c	14 Feb 2005 14:52:59 -0000
@@ -81,31 +81,45 @@
 	}
 }
 
-static void set_domain_search (NMDevice *dev, const char *domain)
+static void set_domain_searches (NMDevice *dev, const char *searches_str)
 {
 	GError *error = NULL;
-	guint id;
+	GList *elt;
+	char **searches;
 
-	if (dev->app_data->domain_search_id
-	    && !nm_named_manager_remove_domain_search (dev->app_data->named,
-						       dev->app_data->domain_search_id,
-						       &error))
+	/* Reset our domain search list */
+	for (elt = dev->app_data->domain_search_ids; elt; elt = elt->next)
 	{
-		syslog (LOG_ERR, G_GNUC_PRETTY_FUNCTION ": Couldn't remove domain search: %s\n", error->message);
-		g_clear_error (&error);
+		if (!nm_named_manager_remove_domain_search (dev->app_data->named,
+							    GPOINTER_TO_UINT (elt->data),
+							    &error))
+		{
+			syslog (LOG_ERR, G_GNUC_PRETTY_FUNCTION ": Couldn't remove domain search: %s\n", error->message);
+			g_clear_error (&error);
+		}
 	}
-	
-	syslog (LOG_ERR, G_GNUC_PRETTY_FUNCTION ": Adding domain search: %s\n", domain);
-	if ((id = nm_named_manager_add_domain_search (dev->app_data->named,
-						      domain,
-						      &error)))
-		dev->app_data->domain_search_id = id;
-	else
+	g_list_free (dev->app_data->domain_search_ids);
+	dev->app_data->domain_search_ids = NULL;
+
+	searches = g_strsplit (searches_str, " ", 0);
+
+	for (; *searches; searches++) 
 	{
-		dev->app_data->domain_search_id = 0;
-		syslog (LOG_ERR, G_GNUC_PRETTY_FUNCTION ": Couldn't add domain search: %s\n", error->message);
-		g_clear_error (&error);
+		const char *search_elt = *searches;
+		guint id;
+
+		syslog (LOG_ERR, G_GNUC_PRETTY_FUNCTION ": Adding domain search: %s\n", search_elt);
+		if ((id = nm_named_manager_add_domain_search (dev->app_data->named,
+							      search_elt,
+							      &error)))
+			dev->app_data->domain_search_ids = g_list_append (dev->app_data->domain_search_ids, GUINT_TO_POINTER (id));
+		else
+		{
+			syslog (LOG_ERR, G_GNUC_PRETTY_FUNCTION ": Couldn't add domain search: %s\n", error->message);
+			g_clear_error (&error);
+		}
 	}
+	g_strfreev (searches);
 }
 
 /*
@@ -151,7 +165,7 @@
 		set_nameservers (dev, dhcp_interface_option_payload (dev->dhcp_iface, dns), dhcp_interface_option_len (dev->dhcp_iface, dns));
 
 	if (dhcp_interface_option_present (dev->dhcp_iface, domainName))
-		set_domain_search (dev, dhcp_interface_option_payload (dev->dhcp_iface, domainName));
+		set_domain_searches (dev, dhcp_interface_option_payload (dev->dhcp_iface, domainName));
 }
 
 
Index: src/NetworkManagerMain.h
===================================================================
RCS file: /cvs/gnome/NetworkManager/src/NetworkManagerMain.h,v
retrieving revision 1.10
diff -u -r1.10 NetworkManagerMain.h
--- src/NetworkManagerMain.h	13 Feb 2005 22:10:03 -0000	1.10
+++ src/NetworkManagerMain.h	14 Feb 2005 14:52:59 -0000
@@ -42,7 +42,7 @@
 
 	NMNamedManager			*named;
 	GList				*nameserver_ids; /* For now these are global instead of per-device */
-	guint				 domain_search_id;
+	GList				*domain_search_ids;
 
 	DBusConnection			*dbus_connection;
 	NMDbusMethodList		*nm_methods;

Attachment: signature.asc
Description: This is a digitally signed message part



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]