Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions src/protocol.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -922,6 +922,10 @@ void CProtocol::ParseConnectionLessMessageBody ( const CVector<uint8_t>& vecbyMe
EvaluateCLChannelLevelListMes ( InetAddr, vecbyMesBodyData );
break;

case PROTMESSID_CLM_REQ_CHANNEL_LEVEL_LIST:
EvaluateCLReqChannelLevelListMes ( InetAddr );
break;

case PROTMESSID_CLM_REGISTER_SERVER_RESP:
EvaluateCLRegisterServerResp ( InetAddr, vecbyMesBodyData );
break;
Expand Down Expand Up @@ -2563,6 +2567,13 @@ bool CProtocol::EvaluateCLChannelLevelListMes ( const CHostAddress& InetAddr, co
return false; // no error
}

bool CProtocol::EvaluateCLReqChannelLevelListMes ( const CHostAddress& InetAddr )
{
emit CLReqChannelLevelList ( InetAddr );

return false; // no error
}

void CProtocol::CreateCLRegisterServerResp ( const CHostAddress& InetAddr, const ESvrRegResult eResult )
{
int iPos = 0; // init position pointer
Expand Down
5 changes: 4 additions & 1 deletion src/protocol.h
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,8 @@
#define PROTMESSID_CLM_CHANNEL_LEVEL_LIST 1015 // channel level list
#define PROTMESSID_CLM_REGISTER_SERVER_RESP 1016 // status of server registration request
#define PROTMESSID_CLM_REGISTER_SERVER_EX 1017 // register server with extended information
#define PROTMESSID_CLM_RED_SERVER_LIST 1018 // reduced server list
#define PROTMESSID_CLM_RED_SERVER_LIST 1018 // reduced server list
#define PROTMESSID_CLM_REQ_CHANNEL_LEVEL_LIST 1028 // request channel level list (connectionless)

// special IDs
#define PROTMESSID_SPECIAL_SPLIT_MESSAGE 2001 // a container for split messages
Expand Down Expand Up @@ -281,6 +282,7 @@ class CProtocol : public QObject
bool EvaluateCLConnClientsListMes ( const CHostAddress& InetAddr, const CVector<uint8_t>& vecData );
bool EvaluateCLReqConnClientsListMes ( const CHostAddress& InetAddr );
bool EvaluateCLChannelLevelListMes ( const CHostAddress& InetAddr, const CVector<uint8_t>& vecData );
bool EvaluateCLReqChannelLevelListMes ( const CHostAddress& InetAddr );
bool EvaluateCLRegisterServerResp ( const CHostAddress& InetAddr, const CVector<uint8_t>& vecData );

int iOldRecID;
Expand Down Expand Up @@ -348,5 +350,6 @@ public slots:
void CLConnClientsListMesReceived ( CHostAddress InetAddr, CVector<CChannelInfo> vecChanInfo );
void CLReqConnClientsList ( CHostAddress InetAddr );
void CLChannelLevelListReceived ( CHostAddress InetAddr, CVector<uint16_t> vecLevelList );
void CLReqChannelLevelList ( CHostAddress InetAddr );
void CLRegisterServerResp ( CHostAddress InetAddr, ESvrRegResult eStatus );
};
2 changes: 2 additions & 0 deletions src/server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -280,6 +280,8 @@ CServer::CServer ( const int iNewMaxNumChan,

QObject::connect ( &ConnLessProtocol, &CProtocol::CLReqConnClientsList, this, &CServer::OnCLReqConnClientsList );

QObject::connect ( &ConnLessProtocol, &CProtocol::CLReqChannelLevelList, this, &CServer::OnCLReqChannelLevelList );

QObject::connect ( &ServerListManager, &CServerListManager::SvrRegStatusChanged, this, &CServer::SvrRegStatusChanged );

QObject::connect ( &JamController, &recorder::CJamController::RestartRecorder, this, &CServer::RestartRecorder );
Expand Down
2 changes: 2 additions & 0 deletions src/server.h
Original file line number Diff line number Diff line change
Expand Up @@ -366,6 +366,8 @@ public slots:

void OnCLReqConnClientsList ( CHostAddress InetAddr ) { ConnLessProtocol.CreateCLConnClientsListMes ( InetAddr, CreateChannelList() ); }

void OnCLReqChannelLevelList ( CHostAddress InetAddr ) { ConnLessProtocol.CreateCLChannelLevelListMes ( InetAddr, vecChannelLevels, GetNumberOfConnectedClients() ); }

void OnCLRegisterServerReceived ( CHostAddress InetAddr, CHostAddress LInetAddr, CServerCoreInfo ServerInfo )
{
ServerListManager.Append ( InetAddr, LInetAddr, ServerInfo );
Expand Down
Loading