From: H.G. Muller Date: Fri, 10 Feb 2012 19:51:41 +0000 (+0100) Subject: Fix unloading of first engine on tourney start X-Git-Url: http://winboard.nl/cgi-bin?a=commitdiff_plain;h=688dda3c0b49ceb1144cdedbdbdf1d70bd1747cd;hp=a68d4f3896442273c5134c7d8d2876bb8c4d2e83;p=xboard.git Fix unloading of first engine on tourney start Because NextTourneyGame was loading a new engine before ReserveGame was called to unload it with dummy game nr = -1), the first engine proc kept hanging. --- diff --git a/backend.c b/backend.c index e931764..2b879fe 100644 --- a/backend.c +++ b/backend.c @@ -10047,11 +10047,11 @@ NextTourneyGame (int nr, int *swapColors) matchGame = 1; roundNr = nr / syncInterval + 1; } - if(first.pr != NoProc && second.pr != NoProc) return 1; // engines already loaded + if(first.pr != NoProc && second.pr != NoProc || nr<0) return 1; // engines already loaded // redefine engines, engine dir, etc. NamesToList(firstChessProgramNames, command, mnemonic, "all"); // get mnemonics of installed engines - if(first.pr == NoProc || nr < 0) { + if(first.pr == NoProc) { SetPlayer(whitePlayer, appData.participants); // find white player amongst it, and parse its engine line InitEngine(&first, 0); // initialize ChessProgramStates based on new settings. }