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/test_datacache_quota.c | |
parent | 15de71a29f22caee6b15956b162e1e5a0f5f4f3e (diff) | |
download | gnunet-6652156e7d7083205b68d5fc73a085b88e662d96.tar.gz gnunet-6652156e7d7083205b68d5fc73a085b88e662d96.zip |
mantis 1627
Diffstat (limited to 'src/datacache/test_datacache_quota.c')
-rw-r--r-- | src/datacache/test_datacache_quota.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/datacache/test_datacache_quota.c b/src/datacache/test_datacache_quota.c index 77ad63815..d956ac36f 100644 --- a/src/datacache/test_datacache_quota.c +++ b/src/datacache/test_datacache_quota.c | |||
@@ -121,7 +121,7 @@ FAILURE: | |||
121 | int | 121 | int |
122 | main (int argc, char *argv[]) | 122 | main (int argc, char *argv[]) |
123 | { | 123 | { |
124 | const char *pos; | 124 | char *pos; |
125 | char cfg_name[128]; | 125 | char cfg_name[128]; |
126 | char *const xargv[] = { | 126 | char *const xargv[] = { |
127 | "test-datacache-quota", | 127 | "test-datacache-quota", |
@@ -143,14 +143,22 @@ main (int argc, char *argv[]) | |||
143 | "WARNING", | 143 | "WARNING", |
144 | #endif | 144 | #endif |
145 | NULL); | 145 | NULL); |
146 | |||
146 | /* determine name of plugin to use */ | 147 | /* determine name of plugin to use */ |
147 | plugin_name = argv[0]; | 148 | plugin_name = argv[0]; |
148 | while (NULL != (pos = strstr(plugin_name, "_"))) | 149 | while (NULL != (pos = strstr(plugin_name, "_"))) |
149 | plugin_name = pos+1; | 150 | plugin_name = pos+1; |
151 | if (NULL != (pos = strstr(plugin_name, "."))) | ||
152 | pos[0] = 0; | ||
153 | else | ||
154 | pos = (char *) plugin_name; | ||
155 | |||
150 | GNUNET_snprintf (cfg_name, | 156 | GNUNET_snprintf (cfg_name, |
151 | sizeof (cfg_name), | 157 | sizeof (cfg_name), |
152 | "test_datacache_data_%s.conf", | 158 | "test_datacache_data_%s.conf", |
153 | plugin_name); | 159 | plugin_name); |
160 | if (pos != plugin_name) | ||
161 | pos[0] = '.'; | ||
154 | GNUNET_PROGRAM_run ((sizeof (xargv) / sizeof (char *)) - 1, | 162 | GNUNET_PROGRAM_run ((sizeof (xargv) / sizeof (char *)) - 1, |
155 | xargv, "test-datacache-quota", "nohelp", | 163 | xargv, "test-datacache-quota", "nohelp", |
156 | options, &run, NULL); | 164 | options, &run, NULL); |