remove second param from server_do() -- it doesn't work anyway.

This commit is contained in:
Andy2 2011-12-21 18:45:05 -08:00
parent cb04eb8840
commit 2a34cd1e05
6 changed files with 20 additions and 25 deletions

View file

@ -798,7 +798,7 @@ Java_org_eehouse_android_xw4_jni_XwJNI_server_1do
{
jboolean result;
XWJNI_START();
result = server_do( state->game.server, NULL );
result = server_do( state->game.server );
XWJNI_END();
return result;
}
@ -1043,7 +1043,7 @@ Java_org_eehouse_android_xw4_jni_XwJNI_game_1receiveMessage
/* XP_Bool notDone; */
/* in case work's pending */
/* for ( notDone = XP_TRUE; notDone; ) { */
(void)server_do( server, NULL );
(void)server_do( server );
/* } */
(void)server_receiveMessage( server, stream );
/* in case MORE work's pending. Multiple calls are required in at
@ -1052,9 +1052,8 @@ Java_org_eehouse_android_xw4_jni_XwJNI_game_1receiveMessage
robot move. That's because comms can't detect a duplicate initial
packet (in validateInitialMessage()). */
int ii;
XP_Bool notDone;
for ( ii = 0, notDone = XP_TRUE; notDone && ii < 5; ++ii ) {
(void)server_do( server, &notDone );
for ( ii = 0; ii < 5; ++ii ) {
(void)server_do( server );
}
}

View file

@ -964,7 +964,7 @@ showPrevScore( ServerCtxt* server )
} /* showPrevScore */
XP_Bool
server_do( ServerCtxt* server, XP_Bool* moreToDoP )
server_do( ServerCtxt* server )
{
XP_Bool result = XP_TRUE;
@ -1038,9 +1038,7 @@ server_do( ServerCtxt* server, XP_Bool* moreToDoP )
break;
} /* switch */
if ( NULL != moreToDoP ) {
*moreToDoP = moreToDo;
} else if ( moreToDo ) {
if ( moreToDo ) {
util_requestTime( server->vol.util );
}

View file

@ -98,7 +98,7 @@ XP_U16 server_getMissingPlayers( const ServerCtxt* server );
/* Signed in case no dictionary available */
XP_S16 server_countTilesInPool( ServerCtxt* server );
XP_Bool server_do( ServerCtxt* server, XP_Bool* moreToDoP );
XP_Bool server_do( ServerCtxt* server );
XP_Bool server_commitMove( ServerCtxt* server );
XP_Bool server_commitTrade( ServerCtxt* server, const TrayTileSet* oldTiles );

View file

@ -450,7 +450,7 @@ static gboolean
onetime_idle( gpointer data )
{
CursesAppGlobals* globals = (CursesAppGlobals*)data;
if ( server_do( globals->cGlobals.game.server, NULL ) ) {
if ( server_do( globals->cGlobals.game.server ) ) {
if ( !!globals->cGlobals.game.board ) {
board_draw( globals->cGlobals.game.board );
}
@ -1841,7 +1841,7 @@ cursesmain( XP_Bool isServer, LaunchParams* params )
}
#endif
server_do( g_globals.cGlobals.game.server, NULL );
server_do( g_globals.cGlobals.game.server );
g_globals.menuList = g_boardMenuList;
drawMenuLargeOrSmall( &g_globals, g_boardMenuList );

View file

@ -511,7 +511,7 @@ createOrLoadObjects( GtkAppGlobals* globals )
comms_start( globals->cGlobals.game.comms );
}
#endif
server_do( globals->cGlobals.game.server, NULL );
server_do( globals->cGlobals.game.server );
disenable_buttons( globals );
} /* createOrLoadObjects */
@ -823,7 +823,7 @@ new_game_impl( GtkAppGlobals* globals, XP_Bool fireConnDlg )
stream );
}
#endif
(void)server_do( globals->cGlobals.game.server, NULL ); /* assign tiles, etc. */
(void)server_do( globals->cGlobals.game.server ); /* assign tiles, etc. */
board_invalAll( globals->cGlobals.game.board );
board_draw( globals->cGlobals.game.board );
}
@ -845,7 +845,7 @@ game_info( GtkWidget* XP_UNUSED(widget), GtkAppGlobals* globals )
/* Anything to do if OK is clicked? Changed names etc. already saved. Try
server_do in case one's become a robot. */
if ( newGameDialog( globals, &addr, XP_FALSE, XP_FALSE ) ) {
if ( server_do( globals->cGlobals.game.server, NULL ) ) {
if ( server_do( globals->cGlobals.game.server ) ) {
board_draw( globals->cGlobals.game.board );
}
}
@ -1603,7 +1603,7 @@ idle_func( gpointer data )
and bad things can happen. So kill the idle proc asap. */
gtk_idle_remove( globals->idleID );
if ( server_do( globals->cGlobals.game.server, NULL ) ) {
if ( server_do( globals->cGlobals.game.server ) ) {
if ( !!globals->cGlobals.game.board ) {
board_draw( globals->cGlobals.game.board );
}
@ -2059,7 +2059,7 @@ newConnectionInput( GIOChannel *source,
if ( redraw ) {
gtk_util_requestTime( globals->cGlobals.params->util );
} else {
redraw = server_do( globals->cGlobals.game.server, NULL );
redraw = server_do( globals->cGlobals.game.server );
}
if ( redraw ) {
board_draw( globals->cGlobals.game.board );

View file

@ -240,13 +240,12 @@ handle_messages_from( CommonGlobals* cGlobals, const TransportProcs* procs,
if ( comms_checkIncomingStream( cGlobals->game.comms,
stream, NULL ) ) {
ServerCtxt* server = cGlobals->game.server;
(void)server_do( server, NULL );
(void)server_do( server );
handled = server_receiveMessage( server, stream ) || handled;
XP_Bool notDone;
XP_U16 ii;
for ( ii = 0, notDone = XP_TRUE; notDone && ii < 5; ++ii ) {
(void)server_do( server, &notDone );
for ( ii = 0; ii < 5; ++ii ) {
(void)server_do( server );
}
}
stream_destroy( stream );
@ -305,13 +304,12 @@ read_pipe_then_close( CommonGlobals* cGlobals, const TransportProcs* procs )
if ( comms_checkIncomingStream( cGlobals->game.comms,
stream, NULL ) ) {
ServerCtxt* server = cGlobals->game.server;
(void)server_do( server, NULL );
(void)server_do( server );
handled = server_receiveMessage( server, stream ) || handled;
XP_Bool notDone;
XP_U16 ii;
for ( ii = 0, notDone = XP_TRUE; notDone && ii < 5; ++ii ) {
(void)server_do( server, &notDone );
for ( ii = 0; ii < 5; ++ii ) {
(void)server_do( server );
}
}
stream_destroy( stream );