mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2025-06-05 20:13:44 +02:00
fix ANDROID-40: VirtualNetworkConfigOperation out-of-sync with ZT_VirtualNetworkConfigOperation enum
This commit is contained in:
parent
7c2766096c
commit
ed3918b508
1 changed files with 8 additions and 8 deletions
|
@ -37,22 +37,22 @@ public enum VirtualNetworkConfigOperation {
|
||||||
/**
|
/**
|
||||||
* Network is coming up (either for the first time or after service restart)
|
* Network is coming up (either for the first time or after service restart)
|
||||||
*/
|
*/
|
||||||
VIRTUAL_NETWORK_CONFIG_OPERATION_UP(0),
|
VIRTUAL_NETWORK_CONFIG_OPERATION_UP(1),
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Network configuration has been updated
|
* Network configuration has been updated
|
||||||
*/
|
*/
|
||||||
VIRTUAL_NETWORK_CONFIG_OPERATION_CONFIG_UPDATE(1),
|
VIRTUAL_NETWORK_CONFIG_OPERATION_CONFIG_UPDATE(2),
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Network is going down (not permanently)
|
* Network is going down (not permanently)
|
||||||
*/
|
*/
|
||||||
VIRTUAL_NETWORK_CONFIG_OPERATION_DOWN(2),
|
VIRTUAL_NETWORK_CONFIG_OPERATION_DOWN(3),
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Network is going down permanently (leave/delete)
|
* Network is going down permanently (leave/delete)
|
||||||
*/
|
*/
|
||||||
VIRTUAL_NETWORK_CONFIG_OPERATION_DESTROY(3);
|
VIRTUAL_NETWORK_CONFIG_OPERATION_DESTROY(4);
|
||||||
|
|
||||||
@SuppressWarnings({"FieldCanBeLocal", "unused"})
|
@SuppressWarnings({"FieldCanBeLocal", "unused"})
|
||||||
private final int id;
|
private final int id;
|
||||||
|
@ -63,13 +63,13 @@ public enum VirtualNetworkConfigOperation {
|
||||||
|
|
||||||
public static VirtualNetworkConfigOperation fromInt(int id) {
|
public static VirtualNetworkConfigOperation fromInt(int id) {
|
||||||
switch (id) {
|
switch (id) {
|
||||||
case 0:
|
|
||||||
return VIRTUAL_NETWORK_CONFIG_OPERATION_UP;
|
|
||||||
case 1:
|
case 1:
|
||||||
return VIRTUAL_NETWORK_CONFIG_OPERATION_CONFIG_UPDATE;
|
return VIRTUAL_NETWORK_CONFIG_OPERATION_UP;
|
||||||
case 2:
|
case 2:
|
||||||
return VIRTUAL_NETWORK_CONFIG_OPERATION_DOWN;
|
return VIRTUAL_NETWORK_CONFIG_OPERATION_CONFIG_UPDATE;
|
||||||
case 3:
|
case 3:
|
||||||
|
return VIRTUAL_NETWORK_CONFIG_OPERATION_DOWN;
|
||||||
|
case 4:
|
||||||
return VIRTUAL_NETWORK_CONFIG_OPERATION_DESTROY;
|
return VIRTUAL_NETWORK_CONFIG_OPERATION_DESTROY;
|
||||||
default:
|
default:
|
||||||
throw new RuntimeException("Unhandled value: " + id);
|
throw new RuntimeException("Unhandled value: " + id);
|
||||||
|
|
Loading…
Add table
Reference in a new issue