[Frugalware-darcs] fw-control-center: gnetconfig: fixes while creating a new profile.

Priyank priyank at frugalware.org
Sat Jun 9 21:31:25 CEST 2007


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

[gnetconfig: fixes while creating a new profile.
Priyank <priyank at frugalware.org>**20070609192851
  * Only create a profile. donot create an interface along with it.
] {
hunk ./gnetconfig/src/gnetconfig-misc.c 69
-	fwnet_interface_t	*interface = NULL;
hunk ./gnetconfig/src/gnetconfig-misc.c 70
-	/* following code is taken from netconfig */
+	/* following code is borrowed from netconfig */
hunk ./gnetconfig/src/gnetconfig-misc.c 72
-	if (profile == NULL)
-		return NULL;
-	memset (profile, 0, sizeof(fwnet_profile_t));
-	interface = (fwnet_interface_t*) malloc(sizeof(fwnet_interface_t));
-	if (interface == NULL)
-		return NULL;
-	memset (interface, 0, sizeof(fwnet_interface_t));
-	interface->options = NULL;
-	profile->interfaces = g_list_append (profile->interfaces, interface);
-	sprintf (profile->name, name);
+	if (profile)
+	{
+		memset (profile, 0, sizeof(fwnet_profile_t));
+		sprintf (profile->name, name);
+	}
}


More information about the Frugalware-darcs mailing list