From 8148c7699ae387f4e8c269a5ac024e8a8b54aa1c Mon Sep 17 00:00:00 2001 From: Andy2 Date: Wed, 17 Aug 2011 06:52:04 -0700 Subject: [PATCH] don't loop forever on server_do(). It's broken w.r.t. guaranteeing that it can always change state. --- xwords4/android/XWords4/jni/xwjni.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/xwords4/android/XWords4/jni/xwjni.c b/xwords4/android/XWords4/jni/xwjni.c index cc0426787..ca1d65538 100644 --- a/xwords4/android/XWords4/jni/xwjni.c +++ b/xwords4/android/XWords4/jni/xwjni.c @@ -1011,16 +1011,16 @@ Java_org_eehouse_android_xw4_jni_XwJNI_game_1receiveMessage result = comms_checkIncomingStream( state->game.comms, stream, NULL ); if ( result ) { ServerCtxt* server = state->game.server; - XP_Bool notDone; + /* XP_Bool notDone; */ /* in case work's pending */ - for ( notDone = XP_TRUE; notDone; ) { - server_do( server, ¬Done ); - } + /* for ( notDone = XP_TRUE; notDone; ) { */ + (void)server_do( server, NULL ); + /* } */ (void)server_receiveMessage( server, stream ); /* in case MORE work's pending */ - for ( notDone = XP_TRUE; notDone; ) { - server_do( server, ¬Done ); - } + /* for ( notDone = XP_TRUE; notDone; ) { */ + (void)server_do( server, NULL ); + /* } */ } stream_destroy( stream );