aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2019-08-01 13:44:00 +0200
committerChristian Grothoff <christian@grothoff.org>2019-08-01 13:44:00 +0200
commitbd15082550799cbae12d8f21af561786af89f672 (patch)
tree01ccac79c3fe5502028ce9bb0902a49c9e9dbda7
parent7e1a5743118f270d1fb564a4ef05bdb4d70a518c (diff)
downloadgnunet-gtk-bd15082550799cbae12d8f21af561786af89f672.tar.gz
gnunet-gtk-bd15082550799cbae12d8f21af561786af89f672.zip
fix segv regression introduced by xrs
-rw-r--r--src/setup/gnunet-setup-options.c25
-rw-r--r--src/setup/gnunet-setup.c6
2 files changed, 13 insertions, 18 deletions
diff --git a/src/setup/gnunet-setup-options.c b/src/setup/gnunet-setup-options.c
index 348121dc..5c4d10b7 100644
--- a/src/setup/gnunet-setup-options.c
+++ b/src/setup/gnunet-setup-options.c
@@ -404,7 +404,8 @@ static struct PortSpecification port_specifications[] =
404 * Find spinbutton associated with a port specification. 404 * Find spinbutton associated with a port specification.
405 * 405 *
406 * @param i index of the respective port specification 406 * @param i index of the respective port specification
407 * @return spinbutton or NULL in case of an error or if respecitve transport is disabled 407 * @return spinbutton or NULL in case of an error or if respecitve transport is
408 * disabled
408 */ 409 */
409static GtkSpinButton * 410static GtkSpinButton *
410get_port_spinbutton (unsigned int i) 411get_port_spinbutton (unsigned int i)
@@ -1282,7 +1283,6 @@ const struct GNUNET_SETUP_OptionSpecification option_specifications[] = {
1282 gettext_noop ("Should this peer advertise its hostlist to other peers"), 1283 gettext_noop ("Should this peer advertise its hostlist to other peers"),
1283 "https://docs.gnunet.org/#Configuring-your-peer-to-provide-a-hostlist", 1284 "https://docs.gnunet.org/#Configuring-your-peer-to-provide-a-hostlist",
1284 &load_option_list, 1285 &load_option_list,
1285 &load_option_list,
1286 &save_option_list, 1286 &save_option_list,
1287 "-a", 1287 "-a",
1288 NULL, 1288 NULL,
@@ -1387,7 +1387,6 @@ const struct GNUNET_SETUP_OptionSpecification option_specifications[] = {
1387 gettext_noop ("Use a SOCKS v4 proxy"), 1387 gettext_noop ("Use a SOCKS v4 proxy"),
1388 "https://docs.gnunet.org/#Configuration-of-the-HOSTLIST-proxy-settings", 1388 "https://docs.gnunet.org/#Configuration-of-the-HOSTLIST-proxy-settings",
1389 &load_option_list /* abuse! */, 1389 &load_option_list /* abuse! */,
1390 &load_option_list /* abuse! */,
1391 &save_option_list /* abuse! */, 1390 &save_option_list /* abuse! */,
1392 "SOCKS4", 1391 "SOCKS4",
1393 NULL, 1392 NULL,
@@ -1583,7 +1582,7 @@ const struct GNUNET_SETUP_OptionSpecification option_specifications[] = {
1583 "transport", 1582 "transport",
1584 "PLUGINS", 1583 "PLUGINS",
1585 gettext_noop ("Enable communication via DV"), 1584 gettext_noop ("Enable communication via DV"),
1586 "https://docs.gnunet.org/#Distance_002dVector-plugin", 1585 "https://docs.gnunet.org/#Distance_002dVector-plugin",
1587 &load_option_list, 1586 &load_option_list,
1588 &save_option_list, 1587 &save_option_list,
1589 "dv", 1588 "dv",
@@ -2384,7 +2383,7 @@ const struct GNUNET_SETUP_OptionSpecification option_specifications[] = {
2384 "TUN_IFNAME", 2383 "TUN_IFNAME",
2385 gettext_noop ( 2384 gettext_noop (
2386 "Name of the virtual interface the GNUnet exit service should create for traffic exiting the VPN to the Internet"), 2385 "Name of the virtual interface the GNUnet exit service should create for traffic exiting the VPN to the Internet"),
2387 "https://docs.gnunet.org/#Configuring-the-GNUnet-VPN-Exit-Service", 2386 "https://docs.gnunet.org/#Configuring-the-GNUnet-VPN-Exit-Service",
2388 &load_text, 2387 &load_text,
2389 &save_text, 2388 &save_text,
2390 NULL, 2389 NULL,
@@ -2397,7 +2396,7 @@ const struct GNUNET_SETUP_OptionSpecification option_specifications[] = {
2397 "exit", 2396 "exit",
2398 "IPV4ADDR", 2397 "IPV4ADDR",
2399 gettext_noop ("IPv4 address to use for the Exit interface"), 2398 gettext_noop ("IPv4 address to use for the Exit interface"),
2400 "https://docs.gnunet.org/#Configuring-the-GNUnet-VPN-Exit-Service", 2399 "https://docs.gnunet.org/#Configuring-the-GNUnet-VPN-Exit-Service",
2401 &load_text, 2400 &load_text,
2402 &save_text, 2401 &save_text,
2403 NULL, 2402 NULL,
@@ -2410,7 +2409,7 @@ const struct GNUNET_SETUP_OptionSpecification option_specifications[] = {
2410 "exit", 2409 "exit",
2411 "IPV4MASK", 2410 "IPV4MASK",
2412 gettext_noop ("IPv4 network mask to use for the Exit interface"), 2411 gettext_noop ("IPv4 network mask to use for the Exit interface"),
2413 "https://docs.gnunet.org/#Configuring-the-GNUnet-VPN-Exit-Service", 2412 "https://docs.gnunet.org/#Configuring-the-GNUnet-VPN-Exit-Service",
2414 &load_text, 2413 &load_text,
2415 &save_text, 2414 &save_text,
2416 NULL, 2415 NULL,
@@ -2423,7 +2422,7 @@ const struct GNUNET_SETUP_OptionSpecification option_specifications[] = {
2423 "exit", 2422 "exit",
2424 "IPV6ADDR", 2423 "IPV6ADDR",
2425 gettext_noop ("IPv6 address to use for the Exit interface"), 2424 gettext_noop ("IPv6 address to use for the Exit interface"),
2426 "https://docs.gnunet.org/#Configuring-the-GNUnet-VPN-Exit-Service", 2425 "https://docs.gnunet.org/#Configuring-the-GNUnet-VPN-Exit-Service",
2427 &load_text, 2426 &load_text,
2428 &save_text, 2427 &save_text,
2429 NULL, 2428 NULL,
@@ -2436,7 +2435,7 @@ const struct GNUNET_SETUP_OptionSpecification option_specifications[] = {
2436 "exit", 2435 "exit",
2437 "IPV6PREFIX", 2436 "IPV6PREFIX",
2438 gettext_noop ("IPv6 network prefix length to use for the Exit interface"), 2437 gettext_noop ("IPv6 network prefix length to use for the Exit interface"),
2439 "https://docs.gnunet.org/#Configuring-the-GNUnet-VPN-Exit-Service", 2438 "https://docs.gnunet.org/#Configuring-the-GNUnet-VPN-Exit-Service",
2440 &load_number, 2439 &load_number,
2441 &save_number, 2440 &save_number,
2442 NULL, 2441 NULL,
@@ -2451,7 +2450,7 @@ const struct GNUNET_SETUP_OptionSpecification option_specifications[] = {
2451 "EXIT_IPV4", 2450 "EXIT_IPV4",
2452 gettext_noop ( 2451 gettext_noop (
2453 "Allow other users to use your Internet connection for UDP traffic (via the Exit interface)"), 2452 "Allow other users to use your Internet connection for UDP traffic (via the Exit interface)"),
2454 "https://docs.gnunet.org/#Configuring-the-GNUnet-VPN-Exit-Service", 2453 "https://docs.gnunet.org/#Configuring-the-GNUnet-VPN-Exit-Service",
2455 &load_yes_no, 2454 &load_yes_no,
2456 &save_yes_no, 2455 &save_yes_no,
2457 NULL, 2456 NULL,
@@ -2465,7 +2464,7 @@ const struct GNUNET_SETUP_OptionSpecification option_specifications[] = {
2465 "EXIT_IPV6", 2464 "EXIT_IPV6",
2466 gettext_noop ( 2465 gettext_noop (
2467 "Allow other users to use your Internet connection for TCP traffic (via the Exit interface)"), 2466 "Allow other users to use your Internet connection for TCP traffic (via the Exit interface)"),
2468 "https://docs.gnunet.org/#Configuring-the-GNUnet-VPN-Exit-Service", 2467 "https://docs.gnunet.org/#Configuring-the-GNUnet-VPN-Exit-Service",
2469 &load_yes_no, 2468 &load_yes_no,
2470 &save_yes_no, 2469 &save_yes_no,
2471 NULL, 2470 NULL,
@@ -2480,7 +2479,7 @@ const struct GNUNET_SETUP_OptionSpecification option_specifications[] = {
2480 "EXIT_RANGE_IPV4_POLICY", 2479 "EXIT_RANGE_IPV4_POLICY",
2481 gettext_noop ( 2480 gettext_noop (
2482 "Which IPv4 addresses and ports do you allow other users to send traffic towards (via the Exit interface)"), 2481 "Which IPv4 addresses and ports do you allow other users to send traffic towards (via the Exit interface)"),
2483 "https://docs.gnunet.org/#Configuring-the-GNUnet-VPN-Exit-Service", 2482 "https://docs.gnunet.org/#Configuring-the-GNUnet-VPN-Exit-Service",
2484 &load_text, 2483 &load_text,
2485 &save_text, 2484 &save_text,
2486 NULL, 2485 NULL,
@@ -2495,7 +2494,7 @@ const struct GNUNET_SETUP_OptionSpecification option_specifications[] = {
2495 "EXIT_RANGE_IPV6_POLICY", 2494 "EXIT_RANGE_IPV6_POLICY",
2496 gettext_noop ( 2495 gettext_noop (
2497 "Which IPv6 addresses and ports do you allow other users to send traffic towards (via the Exit interface)"), 2496 "Which IPv6 addresses and ports do you allow other users to send traffic towards (via the Exit interface)"),
2498 "https://docs.gnunet.org/#Configuring-the-GNUnet-VPN-Exit-Service", 2497 "https://docs.gnunet.org/#Configuring-the-GNUnet-VPN-Exit-Service",
2499 &load_text, 2498 &load_text,
2500 &save_text, 2499 &save_text,
2501 NULL, 2500 NULL,
diff --git a/src/setup/gnunet-setup.c b/src/setup/gnunet-setup.c
index 84e55aaa..4e9ff6f4 100644
--- a/src/setup/gnunet-setup.c
+++ b/src/setup/gnunet-setup.c
@@ -242,7 +242,6 @@ static void
242load_options () 242load_options ()
243{ 243{
244 const struct GNUNET_SETUP_OptionSpecification *os; 244 const struct GNUNET_SETUP_OptionSpecification *os;
245 unsigned int i;
246 GObject *widget; 245 GObject *widget;
247 char *value; 246 char *value;
248 247
@@ -250,8 +249,7 @@ load_options ()
250 gtk_widget_hide (GTK_WIDGET ( 249 gtk_widget_hide (GTK_WIDGET (
251 GNUNET_SETUP_get_object ("GNUNET_setup_gns_hijack_checkbutton"))); 250 GNUNET_SETUP_get_object ("GNUNET_setup_gns_hijack_checkbutton")));
252#endif 251#endif
253 i = 0; 252 for (unsigned int i = 0; NULL != option_specifications[i].widget_name; i++)
254 while (NULL != option_specifications[i].widget_name)
255 { 253 {
256 os = &option_specifications[i]; 254 os = &option_specifications[i];
257 widget = GNUNET_SETUP_get_object (os->widget_name); 255 widget = GNUNET_SETUP_get_object (os->widget_name);
@@ -260,7 +258,6 @@ load_options ()
260 GNUNET_log (GNUNET_ERROR_TYPE_WARNING, 258 GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
261 _ ("Widget `%s' not found\n"), 259 _ ("Widget `%s' not found\n"),
262 os->widget_name); 260 os->widget_name);
263 i++;
264 continue; 261 continue;
265 } 262 }
266 if (NULL != os->load_function) 263 if (NULL != os->load_function)
@@ -332,7 +329,6 @@ load_options ()
332 G_CALLBACK (&widget_state_change_callback), 329 G_CALLBACK (&widget_state_change_callback),
333 (void *) os); 330 (void *) os);
334 } 331 }
335 i++;
336 } 332 }
337} 333}
338 334