mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2024-12-24 23:26:41 +00:00
update JNI wrapper to reflect removal of lastMulticastFrame and lastUnicastFrame from ZT_Peer struct
This commit is contained in:
parent
c61ca1dea2
commit
e1c930f1b7
java
@ -475,8 +475,6 @@ jobject newPeer(JNIEnv *env, const ZT_Peer &peer)
|
||||
jclass peerClass = NULL;
|
||||
|
||||
jfieldID addressField = NULL;
|
||||
jfieldID lastUnicastFrameField = NULL;
|
||||
jfieldID lastMulticastFrameField = NULL;
|
||||
jfieldID versionMajorField = NULL;
|
||||
jfieldID versionMinorField = NULL;
|
||||
jfieldID versionRevField = NULL;
|
||||
@ -500,20 +498,6 @@ jobject newPeer(JNIEnv *env, const ZT_Peer &peer)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
lastUnicastFrameField = lookup.findField(peerClass, "lastUnicastFrame", "J");
|
||||
if(env->ExceptionCheck() || lastUnicastFrameField == NULL)
|
||||
{
|
||||
LOGE("Error finding lastUnicastFrame field of Peer object");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
lastMulticastFrameField = lookup.findField(peerClass, "lastMulticastFrame", "J");
|
||||
if(env->ExceptionCheck() || lastMulticastFrameField == NULL)
|
||||
{
|
||||
LOGE("Error finding lastMulticastFrame field of Peer object");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
versionMajorField = lookup.findField(peerClass, "versionMajor", "I");
|
||||
if(env->ExceptionCheck() || versionMajorField == NULL)
|
||||
{
|
||||
@ -571,8 +555,6 @@ jobject newPeer(JNIEnv *env, const ZT_Peer &peer)
|
||||
}
|
||||
|
||||
env->SetLongField(peerObject, addressField, (jlong)peer.address);
|
||||
env->SetLongField(peerObject, lastUnicastFrameField, (jlong)peer.lastUnicastFrame);
|
||||
env->SetLongField(peerObject, lastMulticastFrameField, (jlong)peer.lastMulticastFrame);
|
||||
env->SetIntField(peerObject, versionMajorField, peer.versionMajor);
|
||||
env->SetIntField(peerObject, versionMinorField, peer.versionMinor);
|
||||
env->SetIntField(peerObject, versionRevField, peer.versionRev);
|
||||
|
@ -34,8 +34,6 @@ import java.util.ArrayList;
|
||||
*/
|
||||
public final class Peer {
|
||||
private long address;
|
||||
private long lastUnicastFrame;
|
||||
private long lastMulticastFrame;
|
||||
private int versionMajor;
|
||||
private int versionMinor;
|
||||
private int versionRev;
|
||||
@ -52,20 +50,6 @@ public final class Peer {
|
||||
return address;
|
||||
}
|
||||
|
||||
/**
|
||||
* Time we last received a unicast frame from this peer
|
||||
*/
|
||||
public final long lastUnicastFrame() {
|
||||
return lastUnicastFrame;
|
||||
}
|
||||
|
||||
/**
|
||||
* Time we last received a multicast rame from this peer
|
||||
*/
|
||||
public final long lastMulticastFrame() {
|
||||
return lastMulticastFrame;
|
||||
}
|
||||
|
||||
/**
|
||||
* Remote major version or -1 if not known
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user