diff options
author | Christian Grothoff <christian@grothoff.org> | 2010-08-28 21:34:36 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2010-08-28 21:34:36 +0000 |
commit | 57924abe125fa52dce4dc2e84cb0a7c4dcd04579 (patch) | |
tree | 51420ad914e9ac3c0b7ab0974cf574afe4f5f715 /src/datastore/perf_plugin_datastore.c | |
parent | 3cb045c1df8bda92f5b4f54b5f9bf4463096cac0 (diff) | |
download | gnunet-57924abe125fa52dce4dc2e84cb0a7c4dcd04579.tar.gz gnunet-57924abe125fa52dce4dc2e84cb0a7c4dcd04579.zip |
train hacks
Diffstat (limited to 'src/datastore/perf_plugin_datastore.c')
-rw-r--r-- | src/datastore/perf_plugin_datastore.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/datastore/perf_plugin_datastore.c b/src/datastore/perf_plugin_datastore.c index 17cd009bc..4d39d85ac 100644 --- a/src/datastore/perf_plugin_datastore.c +++ b/src/datastore/perf_plugin_datastore.c | |||
@@ -81,6 +81,20 @@ struct CpsRunContext | |||
81 | }; | 81 | }; |
82 | 82 | ||
83 | 83 | ||
84 | /** | ||
85 | * Function called by plugins to notify us about a | ||
86 | * change in their disk utilization. | ||
87 | * | ||
88 | * @param cls closure (NULL) | ||
89 | * @param delta change in disk utilization, | ||
90 | * 0 for "reset to empty" | ||
91 | */ | ||
92 | static void | ||
93 | disk_utilization_change_cb (void *cls, | ||
94 | int delta) | ||
95 | { | ||
96 | } | ||
97 | |||
84 | 98 | ||
85 | static void | 99 | static void |
86 | putValue (struct GNUNET_DATASTORE_PluginFunctions * api, int i, int k) | 100 | putValue (struct GNUNET_DATASTORE_PluginFunctions * api, int i, int k) |
@@ -331,6 +345,8 @@ load_plugin (const struct GNUNET_CONFIGURATION_Handle *cfg, | |||
331 | } | 345 | } |
332 | env.cfg = cfg; | 346 | env.cfg = cfg; |
333 | env.sched = sched; | 347 | env.sched = sched; |
348 | env.duc = &disk_utilization_change_cb; | ||
349 | env.cls = NULL; | ||
334 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, | 350 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, |
335 | _("Loading `%s' datastore plugin\n"), name); | 351 | _("Loading `%s' datastore plugin\n"), name); |
336 | GNUNET_asprintf (&libname, "libgnunet_plugin_datastore_%s", name); | 352 | GNUNET_asprintf (&libname, "libgnunet_plugin_datastore_%s", name); |