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

Diff for /pegasus/src/Pegasus/Common/SCMO.cpp between version 1.14.2.4 and 1.15

version 1.14.2.4, 2012/05/25 13:04:22 version 1.15, 2011/08/25 10:28:00
Line 2345 
Line 2345 
     _setBinary(hostName,len+1,inst.hdr->hostName,&inst.mem);     _setBinary(hostName,len+1,inst.hdr->hostName,&inst.mem);
 } }
  
   void SCMOInstance::setHostName_l(const char* hostName, Uint32 len)
   {
       // Copy on Write is only necessary if a realloc() becomes necessary
       if (inst.mem->freeBytes < ((len+8) & ~7))
       {
           _copyOnWrite();
       }
       // copy including trailing '\0'
       _setBinary(hostName,len+1,inst.hdr->hostName,&inst.mem);
   }
   
 const char* SCMOInstance::getHostName() const const char* SCMOInstance::getHostName() const
 { {
     return _getCharString(inst.hdr->hostName,inst.base);     return _getCharString(inst.hdr->hostName,inst.base);
Line 2461 
Line 2472 
     return _getCharString(inst.hdr->instNameSpace,inst.base);     return _getCharString(inst.hdr->instNameSpace,inst.base);
 } }
  
 void SCMOInstance::completeHostNameAndNamespace(  
     const char* hn,  
     Uint32 hnLen,  
     const char* ns,  
     Uint32 nsLen)  
 {  
     // hostName is Null or empty String ?  
     if (0 == inst.hdr->hostName.size ||  
         0 == inst.base[inst.hdr->hostName.start])  
     {  
         // Copy on Write is only necessary if a realloc() becomes necessary  
         if (inst.mem->freeBytes < ((hnLen+8) & ~7))  
         {  
             _copyOnWrite();  
         }  
         // copy including trailing '\0'  
         _setBinary(hn,hnLen+1,inst.hdr->hostName,&inst.mem);  
     }  
     // namespace is Null or empty String ?  
     if (0 == inst.hdr->instNameSpace.size ||  
         0 == inst.base[inst.hdr->instNameSpace.start])  
     {  
         setNameSpace_l(ns,nsLen);  
     }  
 }  
   
   
 void SCMOInstance::buildKeyBindingsFromProperties() void SCMOInstance::buildKeyBindingsFromProperties()
 { {
     Uint32 propNode;     Uint32 propNode;
Line 2503 
Line 2487 
     SCMBValue* theInstPropNodeArray=     SCMBValue* theInstPropNodeArray=
         (SCMBValue*)&inst.base[inst.hdr->propertyArray.start];         (SCMBValue*)&inst.base[inst.hdr->propertyArray.start];
  
     inst.hdr->numberKeyBindings =  
         inst.hdr->theClass.ptr->cls.hdr->keyBindingSet.number;  
   
     for (Uint32 i = 0, k = inst.hdr->numberKeyBindings; i < k; i++)     for (Uint32 i = 0, k = inst.hdr->numberKeyBindings; i < k; i++)
     {     {
         // If the keybinding is not set.         // If the keybinding is not set.
Line 3745 
Line 3726 
  
     case CIMTYPE_STRING:     case CIMTYPE_STRING:
         {         {
             CString cstr = ((String*)((void*)&u))->getCString();              _setString(*((String*)((void*)&u)),
             const char *cptr = (const char*)cstr;  
             _setBinary(  
                 cptr,  
                 strlen(cptr) + 1,  
                 scmoUnion->stringValue,                 scmoUnion->stringValue,
                 pmem );                 pmem );
             break;             break;
Line 4353 
Line 4330 
     // Clear the keybindings after the allocation. Setting the keybindings     // Clear the keybindings after the allocation. Setting the keybindings
     // later causes this value to be reinitialized.     // later causes this value to be reinitialized.
     inst.hdr->numberKeyBindings = 0;     inst.hdr->numberKeyBindings = 0;
   
     markAsCompromised();  
 } }
  
 Uint32 SCMOInstance::getKeyBindingCount() const Uint32 SCMOInstance::getKeyBindingCount() const


Legend:
Removed from v.1.14.2.4  
changed lines
  Added in v.1.15

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2