Changeset 51fd645cf759

Show
Ignore:
Timestamp:
11/16/08 22:04:11 (7 weeks ago)
Author:
Milosz Derezynski <monostatic77@…>
Branch:
trunk
Message:

* Fix a few more problems with correct type of key registration

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • mcs/mcs.cpp

    r1001 r1002  
    262262        g_return_if_fail( domains.find(domain) != domains.end() ); 
    263263 
    264         KeyType             type          = KeyType(key_default.which()); 
    265         KeyVariant          variant       = key_default; 
     264        domains.find( domain )->second[key] = Key( domain, key, key_default, KeyType(key_default.which()) ); 
    266265 
    267266        if( !m_doc ) 
    268267        { 
    269             domains.find( domain )->second[key] = Key( domain, key, variant, type ); 
    270268            return; 
    271269        } 
    272270 
     271        Key               & key_instance = domains.find( domain )->second[key]; 
     272        KeyType             type         = key_instance.get_type();  
     273        KeyVariant          variant; 
    273274        std::stringstream   xpath; 
    274275        xmlXPathObjectPtr   xpathObj; 
     
    336337        } 
    337338 
    338         domains.find( domain )->second[key] = Key( domain, key, variant, type ); 
     339        key_instance.set_value_silent( variant ); 
    339340 
    340341        clear_xpathobj: