[Frugalware-darcs] fw-control-center: gnetconfig: don't write the gateway entry if blank.

Priyank priyank at frugalware.org
Sat Jun 16 16:40:57 CEST 2007


Darcsweb-Url: http://darcs.frugalware.org/darcsweb/darcsweb.cgi?r=fw-control-center;a=darcs_commitdiff;h=20070616143915-5ce2c-bb027e5ba154fd682b74323b6c6351994802f9f2.gz;

[gnetconfig: don't write the gateway entry if blank.
Priyank <priyank at frugalware.org>**20070616143915
 * When adding a new interface, don't write the gateway = entry if it's
   left blank by the user.
] {
hunk ./gnetconfig/src/gnetconfig-new_interface.c 271
-			snprintf (nif->gateway, FWNET_GW_MAX_SIZE, "default gw %s",
-				(char*)gtk_entry_get_text (GTK_ENTRY(gn_ngateway_entry)));
+			if ((gtk_entry_get_text(GTK_ENTRY(gn_ngateway_entry)))!=NULL &&
+			strlen(gtk_entry_get_text(GTK_ENTRY(gn_ngateway_entry))))
+				snprintf (nif->gateway, FWNET_GW_MAX_SIZE, "default gw %s",
+					(char*)gtk_entry_get_text (GTK_ENTRY(gn_ngateway_entry)));
}


More information about the Frugalware-darcs mailing list