mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2025-04-10 12:39:53 +00:00
remove unused VirtualNetworkConfig.enabled
This commit is contained in:
parent
54fd7c7e9a
commit
b8b8e58586
@ -187,7 +187,7 @@ void setupJNICache(JavaVM *vm) {
|
||||
EXCEPTIONANDNULLCHECK(Peer_ctor = env->GetMethodID(Peer_class, "<init>", "(JIIIILcom/zerotier/sdk/PeerRole;[Lcom/zerotier/sdk/PeerPhysicalPath;)V"));
|
||||
EXCEPTIONANDNULLCHECK(Version_ctor = env->GetMethodID(Version_class, "<init>", "(III)V"));
|
||||
EXCEPTIONANDNULLCHECK(VirtualNetworkConfigListener_onNetworkConfigurationUpdated_method = env->GetMethodID(VirtualNetworkConfigListener_class, "onNetworkConfigurationUpdated", "(JLcom/zerotier/sdk/VirtualNetworkConfigOperation;Lcom/zerotier/sdk/VirtualNetworkConfig;)I"));
|
||||
EXCEPTIONANDNULLCHECK(VirtualNetworkConfig_ctor = env->GetMethodID(VirtualNetworkConfig_class, "<init>", "(JJLjava/lang/String;Lcom/zerotier/sdk/VirtualNetworkStatus;Lcom/zerotier/sdk/VirtualNetworkType;IZZZIZJ[Ljava/net/InetSocketAddress;[Lcom/zerotier/sdk/VirtualNetworkRoute;Lcom/zerotier/sdk/VirtualNetworkDNS;)V"));
|
||||
EXCEPTIONANDNULLCHECK(VirtualNetworkConfig_ctor = env->GetMethodID(VirtualNetworkConfig_class, "<init>", "(JJLjava/lang/String;Lcom/zerotier/sdk/VirtualNetworkStatus;Lcom/zerotier/sdk/VirtualNetworkType;IZZZIJ[Ljava/net/InetSocketAddress;[Lcom/zerotier/sdk/VirtualNetworkRoute;Lcom/zerotier/sdk/VirtualNetworkDNS;)V"));
|
||||
EXCEPTIONANDNULLCHECK(VirtualNetworkDNS_ctor = env->GetMethodID(VirtualNetworkDNS_class, "<init>", "()V"));
|
||||
EXCEPTIONANDNULLCHECK(VirtualNetworkFrameListener_onVirtualNetworkFrame_method = env->GetMethodID(VirtualNetworkFrameListener_class, "onVirtualNetworkFrame", "(JJJJJ[B)V"));
|
||||
EXCEPTIONANDNULLCHECK(VirtualNetworkRoute_ctor = env->GetMethodID(VirtualNetworkRoute_class, "<init>", "()V"));
|
||||
|
@ -68,8 +68,6 @@ public class VirtualNetworkConfig implements Comparable<VirtualNetworkConfig> {
|
||||
|
||||
private final int portError;
|
||||
|
||||
private final boolean enabled;
|
||||
|
||||
private final long netconfRevision;
|
||||
|
||||
private final InetSocketAddress[] assignedAddresses;
|
||||
@ -78,7 +76,7 @@ public class VirtualNetworkConfig implements Comparable<VirtualNetworkConfig> {
|
||||
|
||||
private final VirtualNetworkDNS dns;
|
||||
|
||||
public VirtualNetworkConfig(long nwid, long mac, String name, VirtualNetworkStatus status, VirtualNetworkType type, int mtu, boolean dhcp, boolean bridge, boolean broadcastEnabled, int portError, boolean enabled, long netconfRevision, InetSocketAddress[] assignedAddresses, VirtualNetworkRoute[] routes, VirtualNetworkDNS dns) {
|
||||
public VirtualNetworkConfig(long nwid, long mac, String name, VirtualNetworkStatus status, VirtualNetworkType type, int mtu, boolean dhcp, boolean bridge, boolean broadcastEnabled, int portError, long netconfRevision, InetSocketAddress[] assignedAddresses, VirtualNetworkRoute[] routes, VirtualNetworkDNS dns) {
|
||||
this.nwid = nwid;
|
||||
this.mac = mac;
|
||||
this.name = name;
|
||||
@ -95,7 +93,6 @@ public class VirtualNetworkConfig implements Comparable<VirtualNetworkConfig> {
|
||||
if (netconfRevision < 0) {
|
||||
throw new RuntimeException("netconfRevision < 0: " + netconfRevision);
|
||||
}
|
||||
this.enabled = enabled;
|
||||
this.netconfRevision = netconfRevision;
|
||||
this.assignedAddresses = assignedAddresses;
|
||||
this.routes = routes;
|
||||
@ -104,7 +101,7 @@ public class VirtualNetworkConfig implements Comparable<VirtualNetworkConfig> {
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "VirtualNetworkConfig(" + StringUtils.networkIdToString(nwid) + ", " + StringUtils.macAddressToString(mac) + ", " + name + ", " + status + ", " + type + ", " + mtu + ", " + dhcp + ", " + bridge + ", " + broadcastEnabled + ", " + portError + ", " + enabled + ", " + netconfRevision + ", " + Arrays.toString(assignedAddresses) + ", " + Arrays.toString(routes) + ", " + dns + ")";
|
||||
return "VirtualNetworkConfig(" + StringUtils.networkIdToString(nwid) + ", " + StringUtils.macAddressToString(mac) + ", " + name + ", " + status + ", " + type + ", " + mtu + ", " + dhcp + ", " + bridge + ", " + broadcastEnabled + ", " + portError + ", " + netconfRevision + ", " + Arrays.toString(assignedAddresses) + ", " + Arrays.toString(routes) + ", " + dns + ")";
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -177,12 +174,6 @@ public class VirtualNetworkConfig implements Comparable<VirtualNetworkConfig> {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (this.enabled != cfg.enabled) {
|
||||
Log.i(TAG, "Enabled Changed. Old: " + this.enabled + ", New: " + cfg.enabled);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
if (this.netconfRevision != cfg.netconfRevision) {
|
||||
Log.i(TAG, "NetConfRevision Changed. Old: " + this.netconfRevision + ", New: " + cfg.netconfRevision);
|
||||
|
||||
@ -287,7 +278,6 @@ public class VirtualNetworkConfig implements Comparable<VirtualNetworkConfig> {
|
||||
result = 37 * result + (bridge ? 1 : 0);
|
||||
result = 37 * result + (broadcastEnabled ? 1 : 0);
|
||||
result = 37 * result + portError;
|
||||
result = 37 * result + (enabled ? 1 : 0);
|
||||
result = 37 * result + (int) (netconfRevision ^ (netconfRevision >>> 32));
|
||||
result = 37 * result + Arrays.hashCode(assignedAddresses);
|
||||
result = 37 * result + Arrays.hashCode(routes);
|
||||
|
Loading…
x
Reference in New Issue
Block a user