mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2024-12-26 09:58:20 +01:00
When forwarding message, lookup cref by socket if cookieID == 0, as
can be the case when through to a non-all-connected game.
This commit is contained in:
parent
f6fb019732
commit
2d4ae3e44a
1 changed files with 7 additions and 2 deletions
|
@ -427,8 +427,13 @@ forwardMessage( unsigned char* buf, int buflen, int srcSocket )
|
||||||
&& getNetByte( &bufp, end, &dest ) ) {
|
&& getNetByte( &bufp, end, &dest ) ) {
|
||||||
logf( XW_LOGINFO, "cookieID = %d", cookieID );
|
logf( XW_LOGINFO, "cookieID = %d", cookieID );
|
||||||
|
|
||||||
SafeCref scr( cookieID );
|
if ( COOKIE_ID_NONE == cookieID ) {
|
||||||
success = scr.Forward( src, dest, buf, buflen );
|
SafeCref scr( srcSocket );
|
||||||
|
success = scr.Forward( src, dest, buf, buflen );
|
||||||
|
} else {
|
||||||
|
SafeCref scr( cookieID ); /* won't work if not allcon; will be 0 */
|
||||||
|
success = scr.Forward( src, dest, buf, buflen );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return success;
|
return success;
|
||||||
} /* forwardMessage */
|
} /* forwardMessage */
|
||||||
|
|
Loading…
Reference in a new issue