mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2025-03-13 15:56:26 +00:00
fix ANDROID-36: issues with ResultCode
This commit is contained in:
parent
34ff813e2a
commit
acd8b95114
@ -42,7 +42,12 @@ public enum ResultCode {
|
|||||||
/**
|
/**
|
||||||
* Operation completed normally
|
* Operation completed normally
|
||||||
*/
|
*/
|
||||||
RESULT_OK(0),
|
RESULT_OK(0),
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Call produced no error but no action was taken
|
||||||
|
*/
|
||||||
|
RESULT_OK_IGNORED(1),
|
||||||
|
|
||||||
// Fatal errors (>=100, <1000)
|
// Fatal errors (>=100, <1000)
|
||||||
/**
|
/**
|
||||||
@ -81,6 +86,8 @@ public enum ResultCode {
|
|||||||
switch (id) {
|
switch (id) {
|
||||||
case 0:
|
case 0:
|
||||||
return RESULT_OK;
|
return RESULT_OK;
|
||||||
|
case 1:
|
||||||
|
return RESULT_OK_IGNORED;
|
||||||
case 100:
|
case 100:
|
||||||
return RESULT_FATAL_ERROR_OUT_OF_MEMORY;
|
return RESULT_FATAL_ERROR_OUT_OF_MEMORY;
|
||||||
case 101:
|
case 101:
|
||||||
@ -98,7 +105,7 @@ public enum ResultCode {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isFatal(int id) {
|
public boolean isFatal() {
|
||||||
return (id > 100 && id < 1000);
|
return (id >= 100 && id < 1000);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user