diff options
author | Christian Grothoff <christian@grothoff.org> | 2010-12-19 18:27:51 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2010-12-19 18:27:51 +0000 |
commit | 6652156e7d7083205b68d5fc73a085b88e662d96 (patch) | |
tree | 546b23e0ae412c947da65df4a7ec0b8f73be0d92 /src/datacache/perf_datacache.c | |
parent | 15de71a29f22caee6b15956b162e1e5a0f5f4f3e (diff) | |
download | gnunet-6652156e7d7083205b68d5fc73a085b88e662d96.tar.gz gnunet-6652156e7d7083205b68d5fc73a085b88e662d96.zip |
mantis 1627
Diffstat (limited to 'src/datacache/perf_datacache.c')
-rw-r--r-- | src/datacache/perf_datacache.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/datacache/perf_datacache.c b/src/datacache/perf_datacache.c index f32574019..ff60a58a4 100644 --- a/src/datacache/perf_datacache.c +++ b/src/datacache/perf_datacache.c | |||
@@ -131,7 +131,7 @@ FAILURE: | |||
131 | int | 131 | int |
132 | main (int argc, char *argv[]) | 132 | main (int argc, char *argv[]) |
133 | { | 133 | { |
134 | const char *pos; | 134 | char *pos; |
135 | char cfg_name[128]; | 135 | char cfg_name[128]; |
136 | char *const xargv[] = { | 136 | char *const xargv[] = { |
137 | "perf-datacache", | 137 | "perf-datacache", |
@@ -157,10 +157,17 @@ main (int argc, char *argv[]) | |||
157 | plugin_name = argv[0]; | 157 | plugin_name = argv[0]; |
158 | while (NULL != (pos = strstr(plugin_name, "_"))) | 158 | while (NULL != (pos = strstr(plugin_name, "_"))) |
159 | plugin_name = pos+1; | 159 | plugin_name = pos+1; |
160 | if (NULL != (pos = strstr(plugin_name, "."))) | ||
161 | pos[0] = 0; | ||
162 | else | ||
163 | pos = (char *) plugin_name; | ||
164 | |||
160 | GNUNET_snprintf (cfg_name, | 165 | GNUNET_snprintf (cfg_name, |
161 | sizeof (cfg_name), | 166 | sizeof (cfg_name), |
162 | "perf_datacache_data_%s.conf", | 167 | "perf_datacache_data_%s.conf", |
163 | plugin_name); | 168 | plugin_name); |
169 | if (pos != plugin_name) | ||
170 | pos[0] = '.'; | ||
164 | GNUNET_PROGRAM_run ((sizeof (xargv) / sizeof (char *)) - 1, | 171 | GNUNET_PROGRAM_run ((sizeof (xargv) / sizeof (char *)) - 1, |
165 | xargv, "perf-datacache", "nohelp", | 172 | xargv, "perf-datacache", "nohelp", |
166 | options, &run, NULL); | 173 | options, &run, NULL); |