(file) Return to CIMListener.cpp CVS log (file) (dir) Up to [Pegasus] / pegasus / src / Pegasus / Listener

Diff for /pegasus/src/Pegasus/Listener/CIMListener.cpp between version 1.36 and 1.40

version 1.36, 2005/05/28 02:02:59 version 1.40, 2006/01/30 16:17:58
Line 1 
Line 1 
 //%2005////////////////////////////////////////////////////////////////////////  //%2006////////////////////////////////////////////////////////////////////////
 // //
 // Copyright (c) 2000, 2001, 2002 BMC Software; Hewlett-Packard Development // Copyright (c) 2000, 2001, 2002 BMC Software; Hewlett-Packard Development
 // Company, L.P.; IBM Corp.; The Open Group; Tivoli Systems. // Company, L.P.; IBM Corp.; The Open Group; Tivoli Systems.
Line 8 
Line 8 
 // IBM Corp.; EMC Corporation; VERITAS Software Corporation; The Open Group. // IBM Corp.; EMC Corporation; VERITAS Software Corporation; The Open Group.
 // Copyright (c) 2005 Hewlett-Packard Development Company, L.P.; IBM Corp.; // Copyright (c) 2005 Hewlett-Packard Development Company, L.P.; IBM Corp.;
 // EMC Corporation; VERITAS Software Corporation; The Open Group. // EMC Corporation; VERITAS Software Corporation; The Open Group.
   // Copyright (c) 2006 Hewlett-Packard Development Company, L.P.; IBM Corp.;
   // EMC Corporation; Symantec Corporation; The Open Group.
 // //
 // Permission is hereby granted, free of charge, to any person obtaining a copy // Permission is hereby granted, free of charge, to any person obtaining a copy
 // of this software and associated documentation files (the "Software"), to // of this software and associated documentation files (the "Software"), to
Line 46 
Line 48 
 #include <Pegasus/Common/Monitor.h> #include <Pegasus/Common/Monitor.h>
 #include <Pegasus/Common/HTTPAcceptor.h> #include <Pegasus/Common/HTTPAcceptor.h>
 #include <Pegasus/Common/PegasusVersion.h> #include <Pegasus/Common/PegasusVersion.h>
   #include <Pegasus/Common/MessageLoader.h>
  
 #include <Pegasus/ExportServer/CIMExportResponseEncoder.h> #include <Pegasus/ExportServer/CIMExportResponseEncoder.h>
 #include <Pegasus/ExportServer/CIMExportRequestDecoder.h> #include <Pegasus/ExportServer/CIMExportRequestDecoder.h>
Line 197 
Line 200 
     { // Bind to the port     { // Bind to the port
       _acceptor->bind();       _acceptor->bind();
  
       PEGASUS_STD(cout) << "Listening on HTTP port " << _portNumber << PEGASUS_STD(endl);  
   
       //listener.addAcceptor(false, portNumberHttp, false);       //listener.addAcceptor(false, portNumberHttp, false);
       Logger::put(Logger::STANDARD_LOG, System::CIMLISTENER, Logger::INFORMATION,       Logger::put(Logger::STANDARD_LOG, System::CIMLISTENER, Logger::INFORMATION,
                         "Listening on HTTP port $0.", _portNumber);                         "Listening on HTTP port $0.", _portNumber);
Line 313 
Line 314 
  
 PEGASUS_THREAD_RETURN PEGASUS_THREAD_CDECL CIMListenerService::_listener_routine(void *param) PEGASUS_THREAD_RETURN PEGASUS_THREAD_CDECL CIMListenerService::_listener_routine(void *param)
 { {
     try {
     AutoPtr<CIMListenerService> svc(reinterpret_cast<CIMListenerService *>(param));     AutoPtr<CIMListenerService> svc(reinterpret_cast<CIMListenerService *>(param));
  
     //svc->init(); bug 1394     //svc->init(); bug 1394
Line 323 
Line 325 
 #endif #endif
         svc->runForever();         svc->runForever();
     }     }
     } catch (...)
     {
           Tracer::trace(TRC_SERVER, Tracer::LEVEL2,
                           "Unknown exception thrown in _listener_routine.");
     }
     return 0;     return 0;
 } }
  
Line 431 
Line 437 
         struct timeval deallocateWait = {15, 0};         struct timeval deallocateWait = {15, 0};
         AutoPtr<ThreadPool> threadPool(new ThreadPool(0, "Listener", 0, 1, deallocateWait));         AutoPtr<ThreadPool> threadPool(new ThreadPool(0, "Listener", 0, 1, deallocateWait));
         AutoPtr<Semaphore> sem(new Semaphore(0));         AutoPtr<Semaphore> sem(new Semaphore(0));
         threadPool->allocate_and_awaken(svc.get(), CIMListenerService::_listener_routine, sem.get());          if (threadPool->allocate_and_awaken(svc.get(), CIMListenerService::_listener_routine, sem.get()) != PEGASUS_THREAD_OK)
           {
               Logger::put(Logger::STANDARD_LOG, System::CIMSERVER, Logger::TRACE,
                           "Not enough threads to start CIMListernerService.");
   
               Tracer::trace(TRC_SERVER, Tracer::LEVEL2,
                           "Could not allocate thread for CIMListenerService::_listener_routine.");
               throw Exception(MessageLoaderParms("Listener.CIMListener.CANNOT_ALLOCATE_THREAD",
                                   "Could not allocate thread."));
           }
         Logger::put(Logger::STANDARD_LOG,System::CIMLISTENER, Logger::INFORMATION,         Logger::put(Logger::STANDARD_LOG,System::CIMLISTENER, Logger::INFORMATION,
                         "CIMListener started");                         "CIMListener started");
  
         PEGASUS_STD(cerr) << "CIMlistener started" << PEGASUS_STD(endl);  
   
         _svc = svc.release();         _svc = svc.release();
         _thread_pool = threadPool.release();         _thread_pool = threadPool.release();
         _listener_sem = sem.release();         _listener_sem = sem.release();


Legend:
Removed from v.1.36  
changed lines
  Added in v.1.40

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2