Browse Source

Merge branch 'dev' of http://10.6.6.2/zerotier/ZeroTierOne into dev

Adam Ierymenko 9 years ago
parent
commit
deee39343e

+ 4 - 2
java/jni/ZT_jniutils.cpp

@@ -710,14 +710,16 @@ jobject newNetworkConfig(JNIEnv *env, const ZT_VirtualNetworkConfig &vnetConfig)
         return NULL;
     }
 
-    assignedAddressesField = lookup.findField(vnetConfigClass, "assignedAddresses", "[Ljava/net/InetSocketAddress;");
+    assignedAddressesField = lookup.findField(vnetConfigClass, "assignedAddresses", 
+        "[Ljava/net/InetSocketAddress;");
     if(env->ExceptionCheck() || assignedAddressesField == NULL)
     {
         LOGE("Error getting assignedAddresses field");
         return NULL;
     }
 
-    routesField = lookup.findField(vnetConfigClass, "routes", "[Lcom/zerotier/sdk/VirtualNetworkRoute");
+    routesField = lookup.findField(vnetConfigClass, "routes", 
+        "[Lcom/zerotier/sdk/VirtualNetworkRoute;");
     if(env->ExceptionCheck() || routesField == NULL)
     {
         LOGE("Error getting routes field");

+ 1 - 1
java/src/com/zerotier/sdk/VirtualNetworkRoute.java

@@ -29,7 +29,7 @@ package com.zerotier.sdk;
 
 import java.net.InetSocketAddress;
 
-public class VirtualNetworkRoute
+public final class VirtualNetworkRoute
 {
 	private VirtualNetworkRoute() {}
 

+ 0 - 55
java/src/com/zerotier/sdk/VirtualnetworkRoute.java

@@ -1,55 +0,0 @@
-/*
- * ZeroTier One - Network Virtualization Everywhere
- * Copyright (C) 2011-2015  ZeroTier, Inc.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- *
- * --
- *
- * ZeroTier may be used and distributed under the terms of the GPLv3, which
- * are available at: http://www.gnu.org/licenses/gpl-3.0.html
- *
- * If you would like to embed ZeroTier into a commercial application or
- * redistribute it in a modified binary form, please contact ZeroTier Networks
- * LLC. Start here: http://www.zerotier.com/
- */
-
-package com.zerotier.sdk;
-
-import java.net.InetSocketAddress;
-
-public class VirtualNetworkRoute
-{
-	private VirtualNetworkRoute() {}
-
-	/**
-	 * Target network / netmask bits (in port field) or NULL or 0.0.0.0/0 for default
-	 */
-	public InetSocketAddress target;
-
-	/**
-	 * Gateway IP address (port ignored) or NULL (family == 0) for LAN-local (no gateway)
-	 */
-	public InetSocketAddress via;
-
-	/**
-	 * Route flags
-	 */
-	public int flags;
-
-	/**
-	 * Route metric (not currently used)
-	 */
-	public int metric;
-}