Don't propogate chat when queue too full. This *should* only impact

tests since users won't keep chatting at a non-responsive friend.
This commit is contained in:
Eric House 2013-07-20 08:01:56 -07:00
parent 32150049e2
commit 573a87993e

View file

@ -611,10 +611,14 @@ server_initClientConnection( ServerCtxt* server, XWStreamCtxt* stream )
static void
sendChatTo( ServerCtxt* server, XP_U16 devIndex, const XP_UCHAR const* msg )
{
XWStreamCtxt* stream = messageStreamWithHeader( server, devIndex,
XWPROTO_CHAT );
stringToStream( stream, msg );
stream_destroy( stream );
if ( comms_canChat( server->vol.comms ) ) {
XWStreamCtxt* stream = messageStreamWithHeader( server, devIndex,
XWPROTO_CHAT );
stringToStream( stream, msg );
stream_destroy( stream );
} else {
XP_LOGF( "%s: dropping chat %s; queue too full?", __func__, msg );
}
}
static void