/[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 1835 by iliev, Mon Feb 16 17:56:50 2009 UTC revision 1850 by persson, Sun Mar 1 16:33:22 2009 UTC
# Line 3  Line 3 
3   *   LinuxSampler - modular, streaming capable sampler                     *   *   LinuxSampler - modular, streaming capable sampler                     *
4   *                                                                         *   *                                                                         *
5   *   Copyright (C) 2003, 2004 by Benno Senoner and Christian Schoenebeck   *   *   Copyright (C) 2003, 2004 by Benno Senoner and Christian Schoenebeck   *
6   *   Copyright (C) 2005 - 2008 Christian Schoenebeck                       *   *   Copyright (C) 2005 - 2009 Christian Schoenebeck                       *
7   *                                                                         *   *                                                                         *
8   *   This library is free software; you can redistribute it and/or modify  *   *   This library is free software; you can redistribute it and/or modify  *
9   *   it under the terms of the GNU General Public License as published by  *   *   it under the terms of the GNU General Public License as published by  *
# Line 141  LSCPServer::LSCPServer(Sampler* pSampler Line 141  LSCPServer::LSCPServer(Sampler* pSampler
141  }  }
142    
143  LSCPServer::~LSCPServer() {  LSCPServer::~LSCPServer() {
144        CloseAllConnections();
145        InstrumentManager::StopBackgroundThread();
146  #if defined(WIN32)  #if defined(WIN32)
147      if (hSocket >= 0) closesocket(hSocket);      if (hSocket >= 0) closesocket(hSocket);
148  #else  #else
# Line 624  void LSCPServer::CloseConnection( std::v Line 626  void LSCPServer::CloseConnection( std::v
626          NotifyMutex.Unlock();          NotifyMutex.Unlock();
627  }  }
628    
629    void LSCPServer::CloseAllConnections() {
630        std::vector<yyparse_param_t>::iterator iter = Sessions.begin();
631        while(iter != Sessions.end()) {
632            CloseConnection(iter);
633            iter = Sessions.begin();
634        }
635    }
636    
637  void LSCPServer::LockRTNotify() {  void LSCPServer::LockRTNotify() {
638      RTNotifyMutex.Lock();      RTNotifyMutex.Lock();
639  }  }

Legend:
Removed from v.1835  
changed lines
  Added in v.1850

  ViewVC Help
Powered by ViewVC