Browse Source

Fast poll callback wasn't compiling

JNI-44
Arturo 9 years ago
parent
commit
ac2f0fe091
  1. 5
      src/org/pEp/jniadapter/AbstractEngine.java
  2. 2
      src/org_pEp_jniadapter_AbstractEngine.cc

5
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");
}

2
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

Loading…
Cancel
Save