aboutsummaryrefslogtreecommitdiff
path: root/src/datacache/plugin_datacache_template.c
diff options
context:
space:
mode:
authorDavid Barksdale <amatus.amongus@gmail.com>2013-07-22 08:26:16 -0500
committerDavid Barksdale <amatus.amongus@gmail.com>2013-07-22 08:26:16 -0500
commit7450bd0b6c6c05ee6425e2c63e9b79beb94bfbfa (patch)
treedfde89b41437def7ce23af24db53a11a9b5f1075 /src/datacache/plugin_datacache_template.c
parent740b30688bd745a527f96f9116c19acb3480971a (diff)
Imported Upstream version 0.9.5aupstream
Diffstat (limited to 'src/datacache/plugin_datacache_template.c')
-rw-r--r--src/datacache/plugin_datacache_template.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/src/datacache/plugin_datacache_template.c b/src/datacache/plugin_datacache_template.c
index 2d3f160..3066155 100644
--- a/src/datacache/plugin_datacache_template.c
+++ b/src/datacache/plugin_datacache_template.c
@@ -49,15 +49,19 @@ struct Plugin
* @param data data to store
* @param type type of the value
* @param discard_time when to discard the value in any case
- * @return 0 on error, number of bytes used otherwise
+ * @param path_info_len number of entries in 'path_info'
+ * @param path_info a path through the network
+ * @return 0 if duplicate, -1 on error, number of bytes used otherwise
*/
-static size_t
-template_plugin_put (void *cls, const GNUNET_HashCode * key, size_t size,
+static ssize_t
+template_plugin_put (void *cls, const struct GNUNET_HashCode * key, size_t size,
const char *data, enum GNUNET_BLOCK_Type type,
- struct GNUNET_TIME_Absolute discard_time)
+ struct GNUNET_TIME_Absolute discard_time,
+ unsigned int path_info_len,
+ const struct GNUNET_PeerIdentity *path_info)
{
GNUNET_break (0);
- return 0;
+ return -1;
}
@@ -73,7 +77,7 @@ template_plugin_put (void *cls, const GNUNET_HashCode * key, size_t size,
* @return the number of results found
*/
static unsigned int
-template_plugin_get (void *cls, const GNUNET_HashCode * key,
+template_plugin_get (void *cls, const struct GNUNET_HashCode * key,
enum GNUNET_BLOCK_Type type,
GNUNET_DATACACHE_Iterator iter, void *iter_cls)
{