aboutsummaryrefslogtreecommitdiff
path: root/gnunet-build
diff options
context:
space:
mode:
authorDavid Barksdale <amatus@amatus.name>2014-12-18 01:28:26 -0600
committerDavid Barksdale <amatus@amatus.name>2014-12-18 01:28:26 -0600
commite8879cb2f3b0a1ba019c328968377e190adb427a (patch)
tree743f42f91b834f841939c0188939c0f2f485236c /gnunet-build
parent819bbfb5d21a7dd387988a6ac5e9f75abcf96bb5 (diff)
Peerstore fixes
This is a bitch to test because peers hardly ever earn respect and need to stay connected for more than 5 minutes. I verified that respect is being stored but not that it's correctly retrieved.
Diffstat (limited to 'gnunet-build')
-rw-r--r--gnunet-build/packages/gnunet/gnunet/files/gnunet-svn-34682-all.patch12
-rw-r--r--gnunet-build/packages/gnunet/gnunet/files/plugin_peerstore_emscripten.c9
2 files changed, 5 insertions, 16 deletions
diff --git a/gnunet-build/packages/gnunet/gnunet/files/gnunet-svn-34682-all.patch b/gnunet-build/packages/gnunet/gnunet/files/gnunet-svn-34682-all.patch
index c06af61..5623c38 100644
--- a/gnunet-build/packages/gnunet/gnunet/files/gnunet-svn-34682-all.patch
+++ b/gnunet-build/packages/gnunet/gnunet/files/gnunet-svn-34682-all.patch
@@ -198,18 +198,6 @@ Index: gnunet-svn-34682/src/peerstore/Makefile.am
check_PROGRAMS = \
test_peerstore_api_store \
test_peerstore_api_iterate \
-Index: gnunet-svn-34682/src/peerstore/peerstore_api.c
-===================================================================
---- gnunet-svn-34682/src/peerstore/peerstore_api.c (revision 34682)
-+++ gnunet-svn-34682/src/peerstore/peerstore_api.c (working copy)
-@@ -735,6 +735,7 @@
- if (GNUNET_MESSAGE_TYPE_PEERSTORE_ITERATE_END == msg_type)
- {
- ic->iterating = GNUNET_NO;
-+ ic->ev = NULL;
- GNUNET_PEERSTORE_iterate_cancel (ic);
- if (NULL != callback)
- callback (callback_cls, NULL, NULL);
Index: gnunet-svn-34682/src/regex/gnunet-daemon-regexprofiler.c
===================================================================
--- gnunet-svn-34682/src/regex/gnunet-daemon-regexprofiler.c (revision 34682)
diff --git a/gnunet-build/packages/gnunet/gnunet/files/plugin_peerstore_emscripten.c b/gnunet-build/packages/gnunet/gnunet/files/plugin_peerstore_emscripten.c
index c27bb2e..0568efe 100644
--- a/gnunet-build/packages/gnunet/gnunet/files/plugin_peerstore_emscripten.c
+++ b/gnunet-build/packages/gnunet/gnunet/files/plugin_peerstore_emscripten.c
@@ -145,7 +145,8 @@ peerstore_emscripten_iterate_records (void *cls,
{
EM_ASM_ARGS({
var sub_system = Pointer_stringify($0);
- var peer = $1 ? Array.apply([], HEAP8.subarray($1, $1 + 32)) : null;
+ var peer = $1 ? Array.prototype.slice.call(HEAP8.subarray($1, $1 + 32))
+ : null;
var key = $2 ? Pointer_stringify($2) : null;
var iter = $3;
var iter_cls = $4;
@@ -181,12 +182,12 @@ peerstore_emscripten_iterate_records (void *cls,
cursor.value.expiry]);
cursor.continue();
} else {
- Runtime.dynCall('viii', iter, [iter_cls, 0, 0]);
+ Runtime.dynCall('iiii', iter, [iter_cls, 0, 0]);
}
};
request.onerror = function(e) {
Module.print('cursor request failed');
- Runtime.dynCall('viii', iter, [iter_cls, 0, -1]);
+ Runtime.dynCall('iiii', iter, [iter_cls, 0, -1]);
};
}, sub_system, peer, key, iter, iter_cls, &peerstore_emscripten_iter_wrapper);
return GNUNET_OK;
@@ -220,7 +221,7 @@ peerstore_emscripten_store_record(void *cls,
{
EM_ASM_ARGS({
var sub_system = Pointer_stringify($0);
- var peer = Array.prototype.slice(HEAP8.subarray($1, $1 + 32));
+ var peer = Array.prototype.slice.call(HEAP8.subarray($1, $1 + 32));
var key = Pointer_stringify($2);
var value = new Uint8Array(HEAP8.subarray($3, $3 + $4));
var expiry = $5;