From: H.G. Muller Date: Tue, 22 Jan 2013 19:49:34 +0000 (+0100) Subject: Fix engine timeout problem in match mode X-Git-Url: http://winboard.nl/cgi-bin?a=commitdiff_plain;h=d2245cb3c063d3241cd65b3119b7ef3084ffcfdb;p=xboard.git Fix engine timeout problem in match mode Reload of a reuse=0 engine would cause a done=1 event which would be abort the feature timeout of the other engine in the first game. --- diff --git a/backend.c b/backend.c index 8135410..422bdb9 100644 --- a/backend.c +++ b/backend.c @@ -10024,7 +10024,7 @@ void TwoMachinesEventIfReady P((void)) { static int curMess = 0; - if (first.lastPing != first.lastPong) { + if (first.lastPing != first.lastPong || !first.initDone) { if(curMess != 1) DisplayMessage("", _("Waiting for first chess program")); curMess = 1; ScheduleDelayedEvent(TwoMachinesEventIfReady, 10); // [HGM] fast: lowered from 1000 return; @@ -10994,7 +10994,7 @@ ResurrectChessProgram () if (appData.noChessProgram) return 1; - if(matchMode && appData.tourneyFile[0]) { // [HGM] tourney: make sure we get features after engine replacement. (Should we always do this?) + if(matchMode /*&& appData.tourneyFile[0]*/) { // [HGM] tourney: make sure we get features after engine replacement. (Should we always do this?) if(WaitForEngine(&first, TwoMachinesEventIfReady)) { doInit = 1; return 0; } // request to do init on next visit if(!doInit) return 1; // this replaces testing first.pr != NoProc, which is true when we get here, but first time no reason to abort doInit = 0; // we fell through (first time after starting the engine); make sure it doesn't happen again