(file) Return to cimserver.cpp CVS log (file) (dir) Up to [Pegasus] / pegasus / src / WMIMapper / WMIServer

Diff for /pegasus/src/WMIMapper/WMIServer/cimserver.cpp between version 1.3 and 1.6

version 1.3, 2003/09/11 18:50:28 version 1.6, 2003/11/07 22:35:02
Line 1 
Line 1 
 //%/////////////////////////////////////////////////////////////////////////////  //%2003////////////////////////////////////////////////////////////////////////
 // //
 // Copyright (c) 2000, 2001, 2002 BMC Software, Hewlett-Packard Company, IBM,  // Copyright (c) 2000, 2001, 2002  BMC Software, Hewlett-Packard Development
 // The Open Group, Tivoli Systems  // Company, L. P., IBM Corp., The Open Group, Tivoli Systems.
   // Copyright (c) 2003 BMC Software; Hewlett-Packard Development Company, L. P.;
   // IBM Corp.; EMC 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 107 
Line 109 
 #include <Pegasus/Client/CIMClient.h> #include <Pegasus/Client/CIMClient.h>
 #include <Pegasus/Server/ShutdownService.h> #include <Pegasus/Server/ShutdownService.h>
 #include <Pegasus/Common/Destroyer.h> #include <Pegasus/Common/Destroyer.h>
 #if !defined(PEGASUS_OS_ZOS) && ! defined(PEGASUS_OS_HPUX) && ! defined(PEGASUS_NO_SLP)  
 #include <slp/slp.h>  
 #endif  
  
  
 #if defined(PEGASUS_OS_TYPE_WINDOWS) #if defined(PEGASUS_OS_TYPE_WINDOWS)
Line 179 
Line 178 
  
         cm->mergeCommandLine(argc, argv);         cm->mergeCommandLine(argc, argv);
     }     }
     catch (NoSuchFile nsf)      catch (NoSuchFile&)
     {     {
         throw nsf;          throw;
     }     }
     catch (FileNotReadable fnr)      catch (FileNotReadable&)
     {     {
         throw fnr;          throw;
     }     }
     catch (CannotRenameFile ftrf)      catch (CannotRenameFile&)
     {     {
         throw ftrf;          throw;
     }     }
     catch (ConfigFileSyntaxError cfse)      catch (ConfigFileSyntaxError&)
     {     {
         throw cfse;          throw;
     }     }
     catch(UnrecognizedConfigProperty ucp)      catch(UnrecognizedConfigProperty&)
     {     {
         throw ucp;          throw;
     }     }
     catch(InvalidPropertyValue ipv)      catch(InvalidPropertyValue&)
     {     {
         throw ipv;          throw;
     }     }
 } }
  
Line 768 
Line 767 
             useSLP =  true;             useSLP =  true;
         }         }
     }     }
     catch (UnrecognizedConfigProperty e)      catch (UnrecognizedConfigProperty& e)
     {     {
  
 #ifdef PEGASUS_OS_OS400 #ifdef PEGASUS_OS_OS400
Line 878 
Line 877 
     // try loop to bind the address, and run the server     // try loop to bind the address, and run the server
     try     try
     {     {
 #if !defined(PEGASUS_OS_ZOS) && ! defined(PEGASUS_OS_HPUX) && ! defined(PEGASUS_NO_SLP)  
         char slp_address[32];  
         slp_client *discovery = new slp_client() ;;  
         String serviceURL;  
         serviceURL.assign("service:cim.pegasus://");  
         String host_name = slp_get_host_name();  
         serviceURL.append(host_name);  
         serviceURL.append(":");  
         // ATTN: Fix this to work for multiple connections  
         sprintf(slp_address, "%u",  
                 enableHttpConnection ? portNumberHttp : portNumberHttps);  
         serviceURL.append(slp_address);  
 #endif  
   
         Monitor monitor(true);         Monitor monitor(true);
         CIMServer server(&monitor);         CIMServer server(&monitor);
  
Line 979 
Line 964 
         //         //
         while( !server.terminated() )         while( !server.terminated() )
         {         {
 #if !defined(PEGASUS_OS_ZOS) && ! defined(PEGASUS_OS_HPUX) && ! defined(PEGASUS_NO_SLP)  
           if(useSLP  )  
           {  
             if(  (time(NULL) - last ) > 60 )  
             {  
               if( discovery != NULL && serviceURL.size() )  
                 discovery->srv_reg_all(serviceURL.getCString(),  
                                        "(namespace=root/cimv2)",  
                                        "service:cim.pegasus",  
                                        "DEFAULT",  
                                        70) ;  
               time(&last);  
             }  
   
             discovery->service_listener();  
           }  
 #endif  
           server.runForever();           server.runForever();
         }         }
  


Legend:
Removed from v.1.3  
changed lines
  Added in v.1.6

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2