diff --git a/src/channel.cpp b/src/channel.cpp index f3d78acd..16b6a1d0 100755 --- a/src/channel.cpp +++ b/src/channel.cpp @@ -28,7 +28,6 @@ /* Implementation *************************************************************/ CChannel::CChannel ( const bool bNIsServer ) : bIsServer ( bNIsServer ), - sName ( "" ), vecdGains ( USED_NUM_CHANNELS, (double) 1.0 ), bIsEnabled ( false ), iNetwFrameSizeFact ( FRAME_SIZE_FACTOR_DEFAULT ), @@ -49,6 +48,9 @@ CChannel::CChannel ( const bool bNIsServer ) : CycleTimeVariance.Init ( SYSTEM_FRAME_SIZE_SAMPLES, SYSTEM_SAMPLE_RATE, TIME_MOV_AV_RESPONSE ); + // initialize channel name + ResetName(); + // connections ------------------------------------------------------------- QObject::connect ( &Protocol, diff --git a/src/channel.h b/src/channel.h index ce397304..4c16cba5 100755 --- a/src/channel.h +++ b/src/channel.h @@ -77,6 +77,7 @@ public: bool GetAddress ( CHostAddress& RetAddr ); CHostAddress GetAddress() const { return InetAddr; } + void ResetName() { sName = ""; } // reset does not emit a message void SetName ( const QString sNNa ); QString GetName(); diff --git a/src/server.cpp b/src/server.cpp index fb82299e..870e1aec 100755 --- a/src/server.cpp +++ b/src/server.cpp @@ -643,6 +643,9 @@ bool CServer::PutData ( const CVector& vecbyRecBuf, // address vecChannels[iCurChanID].SetAddress ( HostAdr ); + // reset channel name + vecChannels[iCurChanID].ResetName(); + // reset the channel gains of current channel, at the same // time reset gains of this channel ID for all other channels for ( int i = 0; i < USED_NUM_CHANNELS; i++ )