aboutsummaryrefslogtreecommitdiff
path: root/src/datastore/perf_plugin_datastore.c
diff options
context:
space:
mode:
authorDavid Barksdale <amatus@amat.us>2017-04-16 12:39:43 -0500
committerDavid Barksdale <amatus@amat.us>2017-04-16 12:42:34 -0500
commit4907330f51ffd48af1f7bac6f43c7c7f78c37818 (patch)
treea2cd65dbb24ea5caeda1fff2521f935dd7ea6256 /src/datastore/perf_plugin_datastore.c
parentcacd64d8635201459e59bf2cd8a2ea8fd0699b84 (diff)
downloadgnunet-4907330f51ffd48af1f7bac6f43c7c7f78c37818.tar.gz
gnunet-4907330f51ffd48af1f7bac6f43c7c7f78c37818.zip
[datastore] Combine put and update plugin APIs
This resolves issue #4965.
Diffstat (limited to 'src/datastore/perf_plugin_datastore.c')
-rw-r--r--src/datastore/perf_plugin_datastore.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/datastore/perf_plugin_datastore.c b/src/datastore/perf_plugin_datastore.c
index 2f9502989..d6f44bf9f 100644
--- a/src/datastore/perf_plugin_datastore.c
+++ b/src/datastore/perf_plugin_datastore.c
@@ -181,8 +181,14 @@ do_put (struct CpsRunContext *crc)
181 value[0] = crc->i; 181 value[0] = crc->i;
182 GNUNET_memcpy (&value[4], &i, sizeof (i)); 182 GNUNET_memcpy (&value[4], &i, sizeof (i));
183 prio = GNUNET_CRYPTO_random_u32 (GNUNET_CRYPTO_QUALITY_WEAK, 100); 183 prio = GNUNET_CRYPTO_random_u32 (GNUNET_CRYPTO_QUALITY_WEAK, 100);
184 crc->api->put (crc->api->cls, &key, size, value, 1 + i % 4 /* type */ , 184 crc->api->put (crc->api->cls,
185 prio, i % 4 /* anonymity */ , 185 &key,
186 false /* absent */,
187 size,
188 value,
189 1 + i % 4 /* type */ ,
190 prio,
191 i % 4 /* anonymity */ ,
186 0 /* replication */ , 192 0 /* replication */ ,
187 GNUNET_TIME_relative_to_absolute 193 GNUNET_TIME_relative_to_absolute
188 (GNUNET_TIME_relative_multiply 194 (GNUNET_TIME_relative_multiply
@@ -190,7 +196,8 @@ do_put (struct CpsRunContext *crc)
190 60 * 60 * 60 * 1000 + 196 60 * 60 * 60 * 1000 +
191 GNUNET_CRYPTO_random_u32 197 GNUNET_CRYPTO_random_u32
192 (GNUNET_CRYPTO_QUALITY_WEAK, 1000))), 198 (GNUNET_CRYPTO_QUALITY_WEAK, 1000))),
193 put_continuation, crc); 199 put_continuation,
200 crc);
194 i++; 201 i++;
195} 202}
196 203