aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Wachs <wachs@net.in.tum.de>2012-04-16 14:29:42 +0000
committerMatthias Wachs <wachs@net.in.tum.de>2012-04-16 14:29:42 +0000
commit58082a82b9b089de618dfe693e9342e078437451 (patch)
tree62067ddb7d922cf3db785d61d8d043483bfec31d
parent2cb5aae84e71bab1ed6da6c3651f6373f1d2d36a (diff)
downloadgnunet-58082a82b9b089de618dfe693e9342e078437451.tar.gz
gnunet-58082a82b9b089de618dfe693e9342e078437451.zip
- do not parse back files .conf~ but only files with extension .conf
-rw-r--r--src/util/configuration.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/util/configuration.c b/src/util/configuration.c
index d006ed3ef..35ba15b4e 100644
--- a/src/util/configuration.c
+++ b/src/util/configuration.c
@@ -1228,8 +1228,17 @@ static int
1228parse_configuration_file (void *cls, const char *filename) 1228parse_configuration_file (void *cls, const char *filename)
1229{ 1229{
1230 struct GNUNET_CONFIGURATION_Handle *cfg = cls; 1230 struct GNUNET_CONFIGURATION_Handle *cfg = cls;
1231 char * ext;
1231 int ret; 1232 int ret;
1232 1233
1234 /* Examine file extension */
1235 ext = strrchr (filename, '.');
1236 if ((NULL == ext) || (0 != strcmp (ext, ".conf")))
1237 {
1238 GNUNET_log (GNUNET_ERROR_TYPE_WARNING, "Skipping file `%s'\n", filename);
1239 return GNUNET_OK;
1240 }
1241
1233 ret = GNUNET_CONFIGURATION_parse (cfg, filename); 1242 ret = GNUNET_CONFIGURATION_parse (cfg, filename);
1234 return ret; 1243 return ret;
1235} 1244}