minor code cleanup

This commit is contained in:
Volker Fischer 2011-05-25 07:02:33 +00:00
parent 49070c77c1
commit 423795afc1

View file

@ -180,18 +180,19 @@ bool CChannel::SetSockBufNumFrames ( const int iNewNumFrames,
// block size // block size
SockBuf.Init ( iNetwFrameSize, iNewNumFrames, bPreserve ); SockBuf.Init ( iNetwFrameSize, iNewNumFrames, bPreserve );
// in case we are the client and a change in the buffer is done (not
// TEST in case we are the client, tell the server that the size has changed // an initialization, we assume that "preserve" is only used in case
if ( !bIsServer && bPreserve ) // the buffer is changed), tell the server that the size has changed
{ if ( !bIsServer && bPreserve )
{
// TODO this function call causes the lock up of the protocol mechanism when the // TODO this function call causes the lock up of the protocol mechanism when the
// SetSockBufNumFrames is called directly from UpdateSocketBufferSize // SetSockBufNumFrames is called directly from UpdateSocketBufferSize
// -> find and fix the problem! // -> find and fix the problem!
CreateJitBufMes ( iNewNumFrames ); CreateJitBufMes ( iNewNumFrames );
}
}
return false; // -> no error return false; // -> no error
} }
@ -614,13 +615,12 @@ const double dServerJitterMs = 0.666666; // ms
// if both decisions are equal than use the result // if both decisions are equal than use the result
if ( iUpperHystDec == iLowerHystDec ) if ( iUpperHystDec == iLowerHystDec )
{ {
// set the socket buffer via the main window thread since somehow // updatet the socket buffer size with the new value
// it gives a protocol deadlock if we call the SetSocketBufSize()
// function directly
// TEST // TEST
PostWinMessage ( MS_SET_JIT_BUF_SIZE, iUpperHystDec ); PostWinMessage ( MS_SET_JIT_BUF_SIZE, iUpperHystDec );
// TODO remove MS_SET_JIT_BUF_SIZE!
//SetSockBufNumFrames ( iUpperHystDec, true ); //SetSockBufNumFrames ( iUpperHystDec, true );
} }
@ -633,13 +633,12 @@ const double dServerJitterMs = 0.666666; // ms
{ {
// The old result is not near the new decision, // The old result is not near the new decision,
// use per definition the upper decision. // use per definition the upper decision.
// Set the socket buffer via the main window thread since somehow // updatet the socket buffer size with the new value
// it gives a protocol deadlock if we call the SetSocketBufSize()
// function directly.
// TEST // TEST
PostWinMessage ( MS_SET_JIT_BUF_SIZE, iUpperHystDec ); PostWinMessage ( MS_SET_JIT_BUF_SIZE, iUpperHystDec );
// TODO remove MS_SET_JIT_BUF_SIZE!
//SetSockBufNumFrames ( iUpperHystDec, true ); //SetSockBufNumFrames ( iUpperHystDec, true );
} }