[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r31364 - gnunet-gtk/src/setup
From: |
gnunet |
Subject: |
[GNUnet-SVN] r31364 - gnunet-gtk/src/setup |
Date: |
Fri, 13 Dec 2013 16:07:01 +0100 |
Author: grothoff
Date: 2013-12-13 16:07:00 +0100 (Fri, 13 Dec 2013)
New Revision: 31364
Modified:
gnunet-gtk/src/setup/gnunet-setup.c
gnunet-gtk/src/setup/gnunet-setup.h
Log:
-fix ftbfs with removed gnunet_directory, avoid variables distinguished only by
one letter being capitalized, avoid get-size failure warning
Modified: gnunet-gtk/src/setup/gnunet-setup.c
===================================================================
--- gnunet-gtk/src/setup/gnunet-setup.c 2013-12-13 15:00:33 UTC (rev 31363)
+++ gnunet-gtk/src/setup/gnunet-setup.c 2013-12-13 15:07:00 UTC (rev 31364)
@@ -27,7 +27,6 @@
#include "gnunet-setup-transport.h"
#include "gnunet-setup-options.h"
#include <gnunet/gnunet_constants.h>
-#include <gnunet/gnunet_directories.h>
#include <regex.h>
#if ENABLE_NLS
#include <locale.h>
@@ -42,7 +41,7 @@
/**
* Name of the configuration file.
*/
-static const char *cfgName;
+static const char *option_cfg_name;
/**
* Our configuration.
@@ -341,7 +340,8 @@
cfgDefault = GNUNET_CONFIGURATION_create ();
(void) GNUNET_CONFIGURATION_load (cfgDefault, NULL); /* load defaults only
*/
- ret = GNUNET_CONFIGURATION_write_diffs (cfgDefault, cfg, cfgName);
+ ret = GNUNET_CONFIGURATION_write_diffs (cfgDefault, cfg,
+ option_cfg_name);
GNUNET_CONFIGURATION_destroy (cfgDefault);
return ret;
}
@@ -542,7 +542,7 @@
GNUNET_OS_INHERIT_STD_ALL,
NULL, NULL,
"gnunet-peerinfo-gtk",
- "-c", cfgName,
+ "-c", option_cfg_name,
NULL);
if (NULL == proc)
{
@@ -600,7 +600,7 @@
if (GNUNET_OK != GNUNET_GTK_main_loop_build_window (ml, NULL))
return;
- cfgName = GNUNET_GTK_main_loop_get_configuration_file (ml);
+ option_cfg_name = GNUNET_GTK_main_loop_get_configuration_file (ml);
cfg = GNUNET_CONFIGURATION_create ();
#ifndef MINGW
@@ -612,7 +612,9 @@
our configuration file */
if (GNUNET_YES ==
GNUNET_DISK_file_test ("/etc/gnunet.conf"))
+ {
(void) GNUNET_CONFIGURATION_load (cfg, "/etc/gnunet.conf");
+ }
else
{
#if HAVE_GETPWNAM
@@ -621,25 +623,32 @@
pw = getpwnam ("gnunet");
if (NULL != pw)
{
- char *cfgname;
+ char *gnunet_user_cfgname;
- GNUNET_asprintf (&cfgname,
+ GNUNET_asprintf (&gnunet_user_cfgname,
"%s%s%s",
pw->pw_dir,
DIR_SEPARATOR_STR,
".config/gnunet.conf");
- (void) GNUNET_CONFIGURATION_load (cfg, cfgname);
- GNUNET_free (cfgname);
+ if (GNUNET_YES ==
+ GNUNET_DISK_file_test (gnunet_user_cfgname))
+ (void) GNUNET_CONFIGURATION_load (cfg, gnunet_user_cfgname);
+ GNUNET_free (gnunet_user_cfgname);
}
#endif
}
- (void) GNUNET_CONFIGURATION_parse (cfg, cfgName);
+ if (GNUNET_YES ==
+ GNUNET_DISK_file_test (option_cfg_name))
+ (void) GNUNET_CONFIGURATION_parse (cfg,
+ option_cfg_name);
}
else
#endif
{
/* only load system defaults and our configuration file */
- (void) GNUNET_CONFIGURATION_load (cfg, cfgName);
+ if (GNUNET_YES ==
+ GNUNET_DISK_file_test (option_cfg_name))
+ (void) GNUNET_CONFIGURATION_load (cfg, option_cfg_name);
}
main_window = GTK_WIDGET (GNUNET_SETUP_get_object ("GNUNET_setup_dialog"));
main_window = GNUNET_GTK_plug_me ("GNUNET_FS_GTK_PLUG",
Modified: gnunet-gtk/src/setup/gnunet-setup.h
===================================================================
--- gnunet-gtk/src/setup/gnunet-setup.h 2013-12-13 15:00:33 UTC (rev 31363)
+++ gnunet-gtk/src/setup/gnunet-setup.h 2013-12-13 15:07:00 UTC (rev 31364)
@@ -27,7 +27,6 @@
#define GNUNET_SETUP_H
#include "gnunet_gtk.h"
-#include <gnunet/gnunet_directories.h>
#include <gnunet/gnunet_util_lib.h>
#include <gladeui/glade.h>
#include <gtk/gtk.h>
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r31364 - gnunet-gtk/src/setup,
gnunet <=