Even more bugfixes.

This commit is contained in:
Gunnar Beutner 2012-06-12 11:34:48 +02:00
parent 900e65d009
commit c44d8d5912
2 changed files with 11 additions and 2 deletions

View File

@ -38,6 +38,15 @@ void Variant::Convert(VariantType newType) const
return;
}
if (m_Type == VariantInteger && newType == VariantString) {
stringstream sbuf;
sbuf << m_IntegerValue;
m_StringValue = sbuf.str();
m_Type = VariantString;
return;
}
// TODO: convert variant data
throw runtime_error("Invalid variant conversion.");
}

View File

@ -128,7 +128,7 @@ int ConfigRpcComponent::FetchObjectsHandler(const NewRequestEventArgs& ea)
int ConfigRpcComponent::LocalObjectCommittedHandler(const ObjectSetEventArgs<ConfigObject::Ptr>& ea)
{
ConfigObject::Ptr object = static_pointer_cast<ConfigObject>(ea.Source);
ConfigObject::Ptr object = ea.Target;
if (!ShouldReplicateObject(object))
return 0;
@ -141,7 +141,7 @@ int ConfigRpcComponent::LocalObjectCommittedHandler(const ObjectSetEventArgs<Con
int ConfigRpcComponent::LocalObjectRemovedHandler(const ObjectSetEventArgs<ConfigObject::Ptr>& ea)
{
ConfigObject::Ptr object = static_pointer_cast<ConfigObject>(ea.Source);
ConfigObject::Ptr object = ea.Target;
if (!ShouldReplicateObject(object))
return 0;