/[svn]/linuxsampler/trunk/src/network/lscpserver.cpp
ViewVC logotype

Diff of /linuxsampler/trunk/src/network/lscpserver.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 705 by schoenebeck, Wed Jul 20 21:43:23 2005 UTC revision 707 by iliev, Thu Jul 21 08:38:15 2005 UTC
# Line 205  int LSCPServer::Main() { Line 205  int LSCPServer::Main() {
205          //Now let's deliver late notifies (if any)          //Now let's deliver late notifies (if any)
206          NotifyBufferMutex.Lock();          NotifyBufferMutex.Lock();
207          for (std::map<int,String>::iterator iterNotify = bufferedNotifies.begin(); iterNotify != bufferedNotifies.end(); iterNotify++) {          for (std::map<int,String>::iterator iterNotify = bufferedNotifies.begin(); iterNotify != bufferedNotifies.end(); iterNotify++) {
208                  send(iterNotify->first, iterNotify->second.c_str(), iterNotify->second.size(), 0);                  send(iterNotify->first, iterNotify->second.c_str(), iterNotify->second.size(), MSG_NOSIGNAL);
209                  bufferedNotifies.erase(iterNotify);                  bufferedNotifies.erase(iterNotify);
210          }          }
211          NotifyBufferMutex.Unlock();          NotifyBufferMutex.Unlock();
# Line 255  void LSCPServer::SendLSCPNotify( LSCPEve Line 255  void LSCPServer::SendLSCPNotify( LSCPEve
255          while (true) {          while (true) {
256                  if (NotifyMutex.Trylock()) {                  if (NotifyMutex.Trylock()) {
257                          for(;iter != end; iter++)                          for(;iter != end; iter++)
258                                  send(*iter, notify.c_str(), notify.size(), 0);                                  send(*iter, notify.c_str(), notify.size(), MSG_NOSIGNAL);
259                          NotifyMutex.Unlock();                          NotifyMutex.Unlock();
260                          break;                          break;
261                  } else {                  } else {
# Line 364  void LSCPServer::AnswerClient(String Ret Line 364  void LSCPServer::AnswerClient(String Ret
364      dmsg(2,("LSCPServer::AnswerClient(ReturnMessage=%s)", ReturnMessage.c_str()));      dmsg(2,("LSCPServer::AnswerClient(ReturnMessage=%s)", ReturnMessage.c_str()));
365      if (currentSocket != -1) {      if (currentSocket != -1) {
366              NotifyMutex.Lock();              NotifyMutex.Lock();
367              send(currentSocket, ReturnMessage.c_str(), ReturnMessage.size(), 0);              send(currentSocket, ReturnMessage.c_str(), ReturnMessage.size(), MSG_NOSIGNAL);
368              NotifyMutex.Unlock();              NotifyMutex.Unlock();
369      }      }
370  }  }

Legend:
Removed from v.705  
changed lines
  Added in v.707

  ViewVC Help
Powered by ViewVC