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 static void
sendChatTo( ServerCtxt* server, XP_U16 devIndex, const XP_UCHAR const* msg ) sendChatTo( ServerCtxt* server, XP_U16 devIndex, const XP_UCHAR const* msg )
{ {
XWStreamCtxt* stream = messageStreamWithHeader( server, devIndex, if ( comms_canChat( server->vol.comms ) ) {
XWPROTO_CHAT ); XWStreamCtxt* stream = messageStreamWithHeader( server, devIndex,
stringToStream( stream, msg ); XWPROTO_CHAT );
stream_destroy( stream ); stringToStream( stream, msg );
stream_destroy( stream );
} else {
XP_LOGF( "%s: dropping chat %s; queue too full?", __func__, msg );
}
} }
static void static void