-
Notifications
You must be signed in to change notification settings - Fork 245
Add new RPC methods and notifications (mostly for scripting interaction) to server and client #3730
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -473,6 +473,8 @@ void CServer::OnNewConnection ( int iChID, int iTotChans, CHostAddress RecHostAd | |
|
|
||
| // logging of new connected channel | ||
| Logging.AddNewConnection ( RecHostAddr.InetAddr, iTotChans ); | ||
|
|
||
| emit ClientConnected ( iChID, RecHostAddr.InetAddr, iTotChans ); | ||
| } | ||
|
|
||
| void CServer::OnCLReqServerFeatures ( CHostAddress RecHostAddr ) | ||
|
|
@@ -929,10 +931,7 @@ void CServer::DecodeReceiveData ( const int iChanCnt, const int iNumClients ) | |
| // and emit the client disconnected signal | ||
| if ( eGetStat == GS_CHAN_NOW_DISCONNECTED ) | ||
| { | ||
| if ( JamController.GetRecordingEnabled() ) | ||
| { | ||
| emit ClientDisconnected ( iCurChanID ); // TODO do this outside the mutex lock? | ||
| } | ||
| emit ClientDisconnected ( iCurChanID ); // TODO do this outside the mutex lock? | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do you want to say with the comment that you are unsure if there might be concurrency buts?
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think that comment was added by @pljones?
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah - I wanted the ClientDisconnected to stop the recorder (which is on a separate Qt thread, so thread-safe - and hopefully non-interrupting therefore). My concern over the mutex was how it would affect CServer itself - it shouldn't get interrupted within the mutex by something handling the signal. |
||
|
|
||
| FreeChannel ( iCurChanID ); // note that the channel is now not in use | ||
|
|
||
|
|
@@ -1355,10 +1354,10 @@ void CServer::CreateAndSendChatTextForAllConChannels ( const int iCurChanID, con | |
| ChanName.toHtmlEscaped() + "</b></font> " + strChatText.toHtmlEscaped(); | ||
|
|
||
| // Send chat text to all connected clients --------------------------------- | ||
| SendChatTextToAllConChannels ( strActualMessageText ); | ||
| SendChatTextToAllConChannels ( iCurChanID, strActualMessageText ); | ||
| } | ||
|
|
||
| void CServer::SendChatTextToAllConChannels ( const QString& strChatText ) | ||
| void CServer::SendChatTextToAllConChannels ( const int iSendingChanID, const QString& strChatText ) | ||
| { | ||
| // Send chat text to all connected clients --------------------------------- | ||
| for ( int i = 0; i < iMaxNumChannels; i++ ) | ||
|
|
@@ -1368,6 +1367,8 @@ void CServer::SendChatTextToAllConChannels ( const QString& strChatText ) | |
| vecChannels[i].CreateChatTextMes ( strChatText ); | ||
| } | ||
| } | ||
| // forward the message to the RPC server | ||
| emit sentChatMessage ( iSendingChanID, strChatText ); | ||
| } | ||
|
|
||
| void CServer::SendChatTextToConChannel ( const int iCurChanID, const QString& strChatText ) | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.