/[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 793 by iliev, Wed Oct 26 09:34:38 2005 UTC revision 814 by wylder, Thu Dec 22 19:26:35 2005 UTC
# Line 146  int LSCPServer::Main() { Line 146  int LSCPServer::Main() {
146          //Now let's deliver late notifies (if any)          //Now let's deliver late notifies (if any)
147          NotifyBufferMutex.Lock();          NotifyBufferMutex.Lock();
148          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++) {
149    #ifdef MSG_NOSIGNAL
150                  send(iterNotify->first, iterNotify->second.c_str(), iterNotify->second.size(), MSG_NOSIGNAL);                  send(iterNotify->first, iterNotify->second.c_str(), iterNotify->second.size(), MSG_NOSIGNAL);
151    #else
152                    send(iterNotify->first, iterNotify->second.c_str(), iterNotify->second.size(), 0);
153    #endif
154                  bufferedNotifies.erase(iterNotify);                  bufferedNotifies.erase(iterNotify);
155          }          }
156          NotifyBufferMutex.Unlock();          NotifyBufferMutex.Unlock();
# Line 262  void LSCPServer::SendLSCPNotify( LSCPEve Line 266  void LSCPServer::SendLSCPNotify( LSCPEve
266          while (true) {          while (true) {
267                  if (NotifyMutex.Trylock()) {                  if (NotifyMutex.Trylock()) {
268                          for(;iter != end; iter++)                          for(;iter != end; iter++)
269    #ifdef MSG_NOSIGNAL
270                                  send(*iter, notify.c_str(), notify.size(), MSG_NOSIGNAL);                                  send(*iter, notify.c_str(), notify.size(), MSG_NOSIGNAL);
271    #else
272                                    send(*iter, notify.c_str(), notify.size(), 0);
273    #endif
274                          NotifyMutex.Unlock();                          NotifyMutex.Unlock();
275                          break;                          break;
276                  } else {                  } else {
# Line 371  void LSCPServer::AnswerClient(String Ret Line 379  void LSCPServer::AnswerClient(String Ret
379      dmsg(2,("LSCPServer::AnswerClient(ReturnMessage=%s)", ReturnMessage.c_str()));      dmsg(2,("LSCPServer::AnswerClient(ReturnMessage=%s)", ReturnMessage.c_str()));
380      if (currentSocket != -1) {      if (currentSocket != -1) {
381              NotifyMutex.Lock();              NotifyMutex.Lock();
382    #ifdef MSG_NOSIGNAL
383              send(currentSocket, ReturnMessage.c_str(), ReturnMessage.size(), MSG_NOSIGNAL);              send(currentSocket, ReturnMessage.c_str(), ReturnMessage.size(), MSG_NOSIGNAL);
384    #else
385                send(currentSocket, ReturnMessage.c_str(), ReturnMessage.size(), 0);
386    #endif
387              NotifyMutex.Unlock();              NotifyMutex.Unlock();
388      }      }
389  }  }

Legend:
Removed from v.793  
changed lines
  Added in v.814

  ViewVC Help
Powered by ViewVC