fix ANDROID-51: fieldName is uninitialized

This commit is contained in:
Brenton Bostick 2023-01-31 11:33:34 -05:00
parent bfe4bc2894
commit 01003617cd
2 changed files with 24 additions and 1 deletions

View File

@ -170,8 +170,11 @@ jobject createEvent(JNIEnv *env, ZT_Event event)
fieldName = "EVENT_TRACE";
break;
case ZT_EVENT_USER_MESSAGE:
fieldName = "EVENT_USER_MESSAGE";
break;
case ZT_EVENT_REMOTE_TRACE:
fieldName = "EVENT_REMOTE_TRACE";
break;
default:
break;
}

View File

@ -95,5 +95,25 @@ public enum Event {
*
* <p>Meta-data: {@link String}, TRACE message</p>
*/
EVENT_TRACE
EVENT_TRACE,
/**
* VERB_USER_MESSAGE received
*
* These are generated when a VERB_USER_MESSAGE packet is received via
* ZeroTier VL1.
*/
EVENT_USER_MESSAGE,
/**
* Remote trace received
*
* These are generated when a VERB_REMOTE_TRACE is received. Note
* that any node can fling one of these at us. It is your responsibility
* to filter and determine if it's worth paying attention to. If it's
* not just drop it. Most nodes that are not active controllers ignore
* these, and controllers only save them if they pertain to networks
* with remote tracing enabled.
*/
EVENT_REMOTE_TRACE;
}