SyncContext: Virtual SyncSource type checking

commit 49296bca70 fixed some problems but missed
another point:
If the type used by sub syncsource does not specify the data format explictly,
we cannot decide whether the format the backend supports is compatable with the
format a virtual SyncSource selects. Thus no warning in this case.
This commit is contained in:
Chen Congwu 2010-03-18 17:23:33 +08:00 committed by Patrick Ohly
parent ce11463f10
commit 3ef07ba779

View file

@ -2357,8 +2357,14 @@ void SyncContext::getConfigXML(string &xml, string &configname)
//check the data type
SyncSource *subSource = (*m_sourceListPtr)[source];
SourceType subType = subSource->getSourceType();
if (sourceType.m_format != subType.m_format ||
sourceType.m_forceFormat != subType.m_forceFormat) {
//If there is no format explictly selected in sub SyncSource, we
//have no way to determine whether it works with the format
//specific in the virtual SyncSource, thus no warning in this
//case.
if (!subType.m_format.empty() && (
sourceType.m_format != subType.m_format ||
sourceType.m_forceFormat != subType.m_forceFormat)) {
SE_LOG_WARNING(NULL, NULL,
"Virtual data source \"%s\" and sub data source \"%s\" have different data format. Will use the format in virtual data source.",
vSource->getName(), source.c_str());