Volker Birk 7 years ago
parent
commit
a26eb33573
  1. 2
      src/basic_api.cc
  2. 17
      src/org/pEp/jniadapter/AbstractEngine.java

2
src/basic_api.cc

@ -113,7 +113,7 @@ JNIEXPORT void JNICALL Java_org_pEp_jniadapter_Engine_keyMistrusted(
if (_ident->fpr == NULL || _ident->fpr[0] == 0) { if (_ident->fpr == NULL || _ident->fpr[0] == 0) {
if (_ident->me) if (_ident->me)
::myself(session, _ident); ::myself(session(), _ident);
else else
::update_identity(session(), _ident); ::update_identity(session(), _ident);
} }

17
src/org/pEp/jniadapter/AbstractEngine.java

@ -10,43 +10,26 @@ abstract class AbstractEngine implements AutoCloseable {
System.loadLibrary("pEpJNI"); System.loadLibrary("pEpJNI");
} }
private Sync.MessageToSendCallback messageToSendCallback; private Sync.MessageToSendCallback messageToSendCallback;
private Sync.notifyHandshakeCallback notifyHandshakeCallback; private Sync.notifyHandshakeCallback notifyHandshakeCallback;
private Sync.NeedsFastPollCallback needsFastPollCallback; private Sync.NeedsFastPollCallback needsFastPollCallback;
private native void init() throws pEpException;
private native void release();
private long handle;
final protected long getHandle() {
return handle;
}
public AbstractEngine() throws pEpException { public AbstractEngine() throws pEpException {
synchronized (AbstractEngine.class) { synchronized (AbstractEngine.class) {
init();
} }
} }
final public void close() { final public void close() {
synchronized (AbstractEngine.class){ synchronized (AbstractEngine.class){
release();
} }
} }
private long keyserverThread; private long keyserverThread;
private long keyserverQueue; private long keyserverQueue;
private long syncThread;
private long syncQueue;
public native void startKeyserverLookup(); public native void startKeyserverLookup();
public native void stopKeyserverLookup(); public native void stopKeyserverLookup();
public native void startSync();
public native void stopSync();
public static byte[] toUTF8(String str) { public static byte[] toUTF8(String str) {
if (str == null) if (str == null)
return null; return null;

Loading…
Cancel
Save