network-manager-applet r935 - in trunk: . src/connection-editor
- From: dcbw svn gnome org
- To: svn-commits-list gnome org
- Subject: network-manager-applet r935 - in trunk: . src/connection-editor
- Date: Wed, 8 Oct 2008 21:11:17 +0000 (UTC)
Author: dcbw
Date: Wed Oct 8 21:11:17 2008
New Revision: 935
URL: http://svn.gnome.org/viewvc/network-manager-applet?rev=935&view=rev
Log:
2008-10-08 Alexander Sack <asac ubuntu com>
* src/connection-editor/page-ip4.c
- (ui_to_setting) don't stop processing ui_to_settings when
when g_strsplit_set result list contains an empty string.
Modified:
trunk/ChangeLog
trunk/src/connection-editor/page-ip4.c
Modified: trunk/src/connection-editor/page-ip4.c
==============================================================================
--- trunk/src/connection-editor/page-ip4.c (original)
+++ trunk/src/connection-editor/page-ip4.c Wed Oct 8 21:11:17 2008
@@ -815,8 +815,12 @@
items = g_strsplit_set (text, ", ;:", 0);
for (iter = items; *iter; iter++) {
struct in_addr tmp_addr;
+ char *stripped = g_strstrip (*iter);
- if (inet_pton (AF_INET, g_strstrip (*iter), &tmp_addr))
+ if (!strlen (stripped))
+ continue;
+
+ if (inet_pton (AF_INET, stripped, &tmp_addr))
g_array_append_val (dns_servers, tmp_addr.s_addr);
else {
g_strfreev (items);
@@ -830,8 +834,12 @@
text = gtk_entry_get_text (GTK_ENTRY (priv->dns_searches));
if (text && strlen (text)) {
items = g_strsplit_set (text, ", ;:", 0);
- for (iter = items; *iter; iter++)
- search_domains = g_slist_prepend (search_domains, g_strdup (g_strstrip (*iter)));
+ for (iter = items; *iter; iter++) {
+ char *stripped = g_strstrip (*iter);
+
+ if (strlen (stripped))
+ search_domains = g_slist_prepend (search_domains, g_strdup (stripped));
+ }
if (items)
g_strfreev (items);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]