This commit is contained in:
Volker Fischer 2009-02-12 23:06:41 +00:00
parent 4c1c6ad14a
commit e6945fdf67
3 changed files with 15 additions and 6 deletions

View file

@ -468,7 +468,10 @@ void CClient::UpdateSocketBufferSize()
// if both decisions are equal than use the result // if both decisions are equal than use the result
if ( iUpperHystDec == iLowerHystDec ) if ( iUpperHystDec == iLowerHystDec )
{ {
SetSockBufSize ( iUpperHystDec ); // set the socket buffer via the main window thread since somehow
// it gives a protocol deadlock if we call the SetSocketBufSize()
// function directly
PostWinMessage ( MS_SET_JIT_BUF_SIZE, iUpperHystDec );
} }
else else
{ {
@ -477,9 +480,12 @@ void CClient::UpdateSocketBufferSize()
if ( !( ( GetSockBufSize() == iUpperHystDec ) || if ( !( ( GetSockBufSize() == iUpperHystDec ) ||
( GetSockBufSize() == iLowerHystDec ) ) ) ( GetSockBufSize() == iLowerHystDec ) ) )
{ {
// 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.
SetSockBufSize ( iUpperHystDec ); // Set the socket buffer via the main window thread since somehow
// it gives a protocol deadlock if we call the SetSocketBufSize()
// function directly.
PostWinMessage ( MS_SET_JIT_BUF_SIZE, iUpperHystDec );
} }
} }
} }

View file

@ -133,6 +133,7 @@ typedef unsigned int _MESSAGE_IDENT;
#define MS_PACKET_RECEIVED 5 #define MS_PACKET_RECEIVED 5
#define MS_PROTOCOL 6 #define MS_PROTOCOL 6
#define MS_ERROR_IN_THREAD 7 #define MS_ERROR_IN_THREAD 7
#define MS_SET_JIT_BUF_SIZE 8
#define MUL_COL_LED_RED 0 #define MUL_COL_LED_RED 0
#define MUL_COL_LED_YELLOW 1 #define MUL_COL_LED_YELLOW 1

View file

@ -369,7 +369,7 @@ void CLlconClientDlg::customEvent ( QEvent* Event )
if ( Event->type() == QEvent::User + 11 ) if ( Event->type() == QEvent::User + 11 )
{ {
const int iMessType = ( (CLlconEvent*) Event )->iMessType; const int iMessType = ( (CLlconEvent*) Event )->iMessType;
const int iStatus = ( (CLlconEvent*) Event )->iStatus; const int iStatus = ( (CLlconEvent*) Event )->iStatus;
switch ( iMessType ) switch ( iMessType )
{ {
@ -377,7 +377,6 @@ void CLlconClientDlg::customEvent ( QEvent* Event )
case MS_SOUND_OUT: case MS_SOUND_OUT:
case MS_JIT_BUF_PUT: case MS_JIT_BUF_PUT:
case MS_JIT_BUF_GET: case MS_JIT_BUF_GET:
// show overall status -> if any LED goes red, this LED will go red // show overall status -> if any LED goes red, this LED will go red
LEDOverallStatus->SetLight ( iStatus ); LEDOverallStatus->SetLight ( iStatus );
break; break;
@ -385,6 +384,9 @@ void CLlconClientDlg::customEvent ( QEvent* Event )
case MS_RESET_ALL: case MS_RESET_ALL:
LEDOverallStatus->Reset(); LEDOverallStatus->Reset();
break; break;
case MS_SET_JIT_BUF_SIZE:
pClient->SetSockBufSize ( iStatus );
} }
// update general settings dialog, too // update general settings dialog, too