mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2024-12-28 09:58:30 +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
|
||||
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;
|
||||
if ( NULL != aprocs->jxport ) {
|
||||
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 );
|
||||
|
||||
jstring str = (*env)->NewStringUTF( env, room );
|
||||
(*env)->CallVoidMethod( env, aprocs->jxport, mid,
|
||||
allHere, nMissing );
|
||||
str, allHere, nMissing );
|
||||
(*env)->DeleteLocalRef( env, str );
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue