mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-16 15:41:16 +01:00
add room name to callback used when device connects: fix jni to compile
This commit is contained in:
parent
7e0bcee6d2
commit
645a042481
1 changed files with 6 additions and 3 deletions
|
@ -95,16 +95,19 @@ and_xport_relayStatus( void* closure, CommsRelayState newState )
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
and_xport_relayConnd( void* closure, XP_Bool allHere, XP_U16 nMissing )
|
and_xport_relayConnd( void* closure, XP_UCHAR* const room,
|
||||||
|
XP_Bool allHere, XP_U16 nMissing )
|
||||||
{
|
{
|
||||||
AndTransportProcs* aprocs = (AndTransportProcs*)closure;
|
AndTransportProcs* aprocs = (AndTransportProcs*)closure;
|
||||||
if ( NULL != aprocs->jxport ) {
|
if ( NULL != aprocs->jxport ) {
|
||||||
JNIEnv* env = *aprocs->envp;
|
JNIEnv* env = *aprocs->envp;
|
||||||
const char* sig = "(ZI)V";
|
const char* sig = "(Ljava/lang/String;ZI)V";
|
||||||
jmethodID mid = getMethodID( env, aprocs->jxport, "relayConnd", sig );
|
jmethodID mid = getMethodID( env, aprocs->jxport, "relayConnd", sig );
|
||||||
|
|
||||||
|
jstring str = (*env)->NewStringUTF( env, room );
|
||||||
(*env)->CallVoidMethod( env, aprocs->jxport, mid,
|
(*env)->CallVoidMethod( env, aprocs->jxport, mid,
|
||||||
allHere, nMissing );
|
str, allHere, nMissing );
|
||||||
|
(*env)->DeleteLocalRef( env, str );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue