mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2024-12-29 10:26:36 +01:00
don't log normal case as error
This commit is contained in:
parent
59bf77c871
commit
958ca38002
1 changed files with 5 additions and 4 deletions
|
@ -414,14 +414,15 @@ getClientIndex( const uint8_t** bufpp, const uint8_t* end,
|
||||||
uint8_t result = 0;
|
uint8_t result = 0;
|
||||||
uint8_t clientIndx;
|
uint8_t clientIndx;
|
||||||
if ( getNetByte( bufpp, end, &clientIndx ) ) {
|
if ( getNetByte( bufpp, end, &clientIndx ) ) {
|
||||||
if ( 0 < clientIndx && clientIndx < nPlayersT ) {
|
if ( 0 == clientIndx ) {
|
||||||
result = 1 + clientIndx; // postgres arrays are 1-based
|
// unset on device: leave it alone
|
||||||
} else {
|
} else if ( clientIndx >= nPlayersT ) {
|
||||||
logf( XW_LOGERROR, "%s: bogus clientIndx %d > nPlayersT %d",
|
logf( XW_LOGERROR, "%s: bogus clientIndx %d > nPlayersT %d",
|
||||||
__func__, clientIndx, nPlayersT );
|
__func__, clientIndx, nPlayersT );
|
||||||
|
} else {
|
||||||
|
result = 1 + clientIndx; // postgres arrays are 1-based
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// logf( XW_LOGINFO, "%s() => %d", __func__, result );
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue