Patrick wrote: >cfgP->initTarget() jumps to NULL and printing the content of cfgP also >shows some garbage. I suspect that the static_cast<TBinfileDSConfig >*>(*pos) is invalid for super datastores. Does that sound plausible? > I think you are right. Here is the simple patch that works so far:
diff --git a/src/sysync/superdatastore.cpp b/src/sysync/superdatastore.cpp
index 7be72b0..67a94a3 100755
--- a/src/sysync/superdatastore.cpp
+++ b/src/sysync/superdatastore.cpp
@@ -82,7 +82,11 @@ bool TSubDSLinkConfig::localStartElement(const char
*aElementName, const char **
// =====================
TSuperDSConfig::TSuperDSConfig(const char* aName, TConfigElement
*aParentElement) :
+#ifdef BASED_ON_BINFILE_CLIENT
+ TBinfileDSConfig(aName,aParentElement)
+#else
TLocalDSConfig(aName,aParentElement)
+#endif
{
clear();
} // TSuperDSConfig::TSuperDSConfig
diff --git a/src/sysync/superdatastore.h b/src/sysync/superdatastore.h
index d18b42c..9f689a5 100755
--- a/src/sysync/superdatastore.h
+++ b/src/sysync/superdatastore.h
@@ -21,6 +21,7 @@
#include "configelement.h"
#include "syncitem.h"
#include "localengineds.h"
+#include "binfileimplds.h"
#ifdef SUPERDATASTORES
@@ -77,9 +78,18 @@ typedef std::list<TSubDatastoreLink> TSubDSLinkList;
// super datastore config
-class TSuperDSConfig: public TLocalDSConfig
+class TSuperDSConfig:
+#ifdef BASED_ON_BINFILE_CLIENT
+ public TBinfileDSConfig
+#else
+ public TLocalDSConfig
+#endif
{
+#ifdef BASED_ON_BINFILE_CLIENT
typedef TLocalDSConfig inherited;
+#else
+ typedef TBinfileDSConfig inherited;
+#endif
public:
TSuperDSConfig(const char* aName, TConfigElement *aParentElement);
virtual ~TSuperDSConfig();
--
1.6.3.3
Best Regards,
Congwu
0001-SuperDatastore-Support-Binfile-based-client.patch
Description: 0001-SuperDatastore-Support-Binfile-based-client.patch
_______________________________________________ os-libsynthesis mailing list [email protected] http://lists.synthesis.ch/mailman/listinfo/os-libsynthesis
