From ac2f0fe091f4c453fe8fbcc1d19d98f041570ffb Mon Sep 17 00:00:00 2001 From: Arturo Date: Tue, 7 Feb 2017 17:33:05 +0100 Subject: [PATCH] Fast poll callback wasn't compiling --- src/org/pEp/jniadapter/AbstractEngine.java | 5 +++-- src/org_pEp_jniadapter_AbstractEngine.cc | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/org/pEp/jniadapter/AbstractEngine.java b/src/org/pEp/jniadapter/AbstractEngine.java index c9119d2..c4f449a 100644 --- a/src/org/pEp/jniadapter/AbstractEngine.java +++ b/src/org/pEp/jniadapter/AbstractEngine.java @@ -13,6 +13,7 @@ abstract class AbstractEngine implements AutoCloseable { private Sync.MessageToSendCallback messageToSendCallback; private Sync.notifyHandshakeCallback notifyHandshakeCallback; + private Sync.NeedsFastPollCallback needsFastPollCallback; private native void init() throws pEpException; private native void release(); @@ -155,9 +156,9 @@ abstract class AbstractEngine implements AutoCloseable { this.notifyHandshakeCallback = notifyHandshakeCallback; } - public int needsFastPollCallFromC(Boolean fast_poll_needed) { + public int needsFastPollCallFromC(boolean fast_poll_needed) { if (needsFastPollCallback != null) { - needsFastPollCallback.needsFastPoll(fast_poll_needed); + needsFastPollCallback.needsFastPollCallFromC(fast_poll_needed); } else { throw new RuntimeException("Callback not set"); } diff --git a/src/org_pEp_jniadapter_AbstractEngine.cc b/src/org_pEp_jniadapter_AbstractEngine.cc index c11b0ee..abf67f2 100644 --- a/src/org_pEp_jniadapter_AbstractEngine.cc +++ b/src/org_pEp_jniadapter_AbstractEngine.cc @@ -286,7 +286,7 @@ extern "C" { end = now + *timeout; } - sync_env->CallVoidMethod(sync_obj, needsFastPollMethodID, needs_fast_poll); + sync_env->CallIntMethod(sync_obj, needsFastPollMethodID, needs_fast_poll); while (!queue->size()){ // TODO: add blocking dequeue