/[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 212 by schoenebeck, Wed Jul 28 14:17:29 2004 UTC revision 219 by schoenebeck, Tue Aug 17 20:35:04 2004 UTC
# Line 147  int LSCPServer::Main() { Line 147  int LSCPServer::Main() {
147                  if (FD_ISSET((*iter).hSession, &selectSet)) {   //Was it this socket?                  if (FD_ISSET((*iter).hSession, &selectSet)) {   //Was it this socket?
148                          if (GetLSCPCommand(iter)) {     //Have we read the entire command?                          if (GetLSCPCommand(iter)) {     //Have we read the entire command?
149                                  dmsg(3,("LSCPServer: Got command on socket %d, calling parser.\n", currentSocket));                                  dmsg(3,("LSCPServer: Got command on socket %d, calling parser.\n", currentSocket));
150                                  yylex_init(&((*iter).pScanner)); //FIXME: should me moved out of this loop and initialized only when a new session is created                                  int dummy; // just a temporary hack to fulfill the restart() function prototype
151                                    restart(NULL, dummy); // restart the 'scanner'
152                                  currentSocket = (*iter).hSession;  //a hack                                  currentSocket = (*iter).hSession;  //a hack
153                                  if ((*iter).bVerbose) { // if echo mode enabled                                  if ((*iter).bVerbose) { // if echo mode enabled
154                                      AnswerClient(bufferedCommands[currentSocket]);                                      AnswerClient(bufferedCommands[currentSocket]);
# Line 173  int LSCPServer::Main() { Line 174  int LSCPServer::Main() {
174          }          }
175          NotifyBufferMutex.Unlock();          NotifyBufferMutex.Unlock();
176      }      }
     //It will never get here anyway  
     //yylex_destroy(yyparse_param.pScanner);  
177  }  }
178    
179  void LSCPServer::CloseConnection( std::vector<yyparse_param_t>::iterator iter ) {  void LSCPServer::CloseConnection( std::vector<yyparse_param_t>::iterator iter ) {
# Line 193  void LSCPServer::CloseConnection( std::v Line 192  void LSCPServer::CloseConnection( std::v
192          bufferedNotifies.erase(socket);          bufferedNotifies.erase(socket);
193          close(socket);          close(socket);
194          NotifyMutex.Unlock();          NotifyMutex.Unlock();
         //yylex_destroy((*iter).pScanner);  
195  }  }
196    
197  void LSCPServer::SendLSCPNotify( LSCPEvent event ) {  void LSCPServer::SendLSCPNotify( LSCPEvent event ) {

Legend:
Removed from v.212  
changed lines
  Added in v.219

  ViewVC Help
Powered by ViewVC