Skip to content

Commit 6dd6cc4

Browse files
committed
refactor EFeatureSet/OnCLReqServerInfo, new entries to EFeatureSet
1 parent 961aecc commit 6dd6cc4

2 files changed

Lines changed: 15 additions & 13 deletions

File tree

src/server.cpp

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -479,14 +479,15 @@ void CServer::OnCLReqServerInfo ( CHostAddress RecHostAddr )
479479
{
480480
uint32_t iFeatures = 0;
481481

482-
iFeatures |= ( !bUseDoubleSystemFrameSize << FS_SMALL_NETW_BUF );
482+
iFeatures |= ( !bUseDoubleSystemFrameSize << FS_FAST_UPDATE );
483483
iFeatures |= ( bUseMultithreading << FS_MULTITHREADING );
484-
iFeatures |= ( GetRecorderInitialised() << FS_RECORDER_INIT );
485-
iFeatures |= ( GetDisableRecording() << FS_DISABLE_RECORDING );
486-
iFeatures |= ( (JamController.GetRecorderState() != RS_RECORDING) << FS_IS_RECORDING );
484+
iFeatures |= ( GetRecorderInitialised() && !GetDisableRecording() << FS_RECORDER_ENABLED );
485+
iFeatures |= ( (JamController.GetRecorderState() == RS_RECORDING) << FS_IS_RECORDING );
487486
iFeatures |= ( bDelayPan << FS_DELAY_PAN );
488-
iFeatures |= ( bEnableIPv6 << FS_ENABLE_IPV6 );
489-
// iFeatures |= ( bDisableRaw << FS_RAW_AUDIO );
487+
iFeatures |= ( IsIPv6Available() << FS_IPV6_AVAILABLE );
488+
iFeatures |= ( bDisableRaw << FS_RAW_AUDIO );
489+
iFeatures |= ( bDisconnectAllClientsOnQuit << FS_DISCONONQUIT );
490+
iFeatures |= ( !strWelcomeMessage.isEmpty() << FS_HAS_WELCOME_MESSAGE );
490491

491492
ConnLessProtocol.CreateCLServerInfoMes ( RecHostAddr, iFeatures );
492493
}

src/util.h

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -617,14 +617,15 @@ enum EDirectoryType
617617
enum EFeatureSet
618618
{
619619
// used for protocol -> enum values must be fixed
620-
FS_SMALL_NETW_BUF = 0,
620+
FS_FAST_UPDATE = 0,
621621
FS_MULTITHREADING = 1,
622-
FS_RECORDER_INIT = 2,
623-
FS_DISABLE_RECORDING = 3,
624-
FS_IS_RECORDING = 4,
625-
FS_DELAY_PAN = 5,
626-
FS_ENABLE_IPV6 = 6,
627-
FS_RAW_AUDIO = 7
622+
FS_RECORDER_ENABLED = 2,
623+
FS_IS_RECORDING = 3,
624+
FS_DELAY_PAN = 4,
625+
FS_IPV6_AVAILABLE = 5,
626+
FS_RAW_AUDIO = 6,
627+
FS_DISCONONQUIT = 7,
628+
FS_HAS_WELCOME_MESSAGE = 8
628629
};
629630

630631
inline QString DirectoryTypeToString ( EDirectoryType eAddrType )

0 commit comments

Comments
 (0)