summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Ohly <patrick.ohly@intel.com>2013-02-27 17:52:10 +0100
committerPatrick Ohly <patrick.ohly@intel.com>2013-02-27 17:52:10 +0100
commitaef307f75b31362f31235367279671ddf5e8eb15 (patch)
tree74165e112310a36da8ffdebbfe6cacc6fffc61d2
parent9b0c01cf2fff6701bdb026518048fc4b06a7072e (diff)
parent7dfd28c0dba8146c78618fac8061f6a1ae79f93c (diff)
Merge remote-tracking branch 'gitorious/master'libsynthesis_3.4.0.47+syncevolution-1-3-99-3
Brings SyncEvolution up to libsynthesis 3.4.0.47, which includes the <syncmodeextensions> option. Must include the <syncmodeextensions> patch in SyncEvolution for this version of libsynthesis.
-rwxr-xr-xsrc/DB_interfaces/api_db/pluginapids.cpp1
-rw-r--r--src/global_options.h10
-rw-r--r--src/sysync/localengineds.cpp15
-rw-r--r--src/sysync/stdlogicds.cpp2
-rwxr-xr-xsrc/sysync/syncagent.cpp2
-rwxr-xr-xsrc/sysync/synccommand.cpp10
-rw-r--r--src/sysync/syncsession.cpp26
-rwxr-xr-xsrc/sysync/syncsession.h2
-rw-r--r--src/sysync_SDK/sdk_sources_cocoa/dbplugin_cocoa.h2
-rw-r--r--src/sysync_SDK/sdk_sources_cocoa/dbplugin_cocoa.m24
-rw-r--r--src/sysync_ios.xcodeproj/project.pbxproj2
-rw-r--r--src/sysync_ios.xcodeproj/xcshareddata/xcschemes/static_clientEngine_opensource_ios.xcscheme3
-rw-r--r--src/sysync_ios.xcodeproj/xcshareddata/xcschemes/static_combiEngine_opensource_ios.xcscheme2
13 files changed, 72 insertions, 29 deletions
diff --git a/src/DB_interfaces/api_db/pluginapids.cpp b/src/DB_interfaces/api_db/pluginapids.cpp
index 0540a28..a912305 100755
--- a/src/DB_interfaces/api_db/pluginapids.cpp
+++ b/src/DB_interfaces/api_db/pluginapids.cpp
@@ -2290,6 +2290,7 @@ localstatus TPluginApiDS::apiLoadAdminData(
case mapentry_invalid:
case mapentry_normal:
case numMapEntryTypes:
+ default:
// nothing to do or should not occur
break;
}
diff --git a/src/global_options.h b/src/global_options.h
index a07ec3e..c4c8af1 100644
--- a/src/global_options.h
+++ b/src/global_options.h
@@ -1,7 +1,7 @@
/* SySync entirely global options (affects all targets)
* ====================================================
*
- * (c) 2001-2011 by Synthesis AG + plan44.ch
+ * (c) 2001-2012 by Synthesis AG + plan44.ch
*
*/
@@ -37,8 +37,8 @@
#endif
// global expiry date (usually applies for unregistered demos or regular products in trial mode)
#ifndef EXPIRY_YEAR
- #define EXPIRY_DATE_STRING "2014-03-31"
- #define EXPIRY_YEAR 2014
+ #define EXPIRY_DATE_STRING "2016-03-31"
+ #define EXPIRY_YEAR 2016
#define EXPIRY_MONTH 3
#define EXPIRY_DAY 31
#endif
@@ -76,8 +76,8 @@
#endif
#ifndef SYSYNC_BUILDNUMBER
-#define SYSYNC_BUILDNUMBER 45
-#define SYSYNC_BUILDNUMBER_TXT "45"
+#define SYSYNC_BUILDNUMBER 47
+#define SYSYNC_BUILDNUMBER_TXT "47"
#endif
diff --git a/src/sysync/localengineds.cpp b/src/sysync/localengineds.cpp
index c81c412..d70d8c3 100644
--- a/src/sysync/localengineds.cpp
+++ b/src/sysync/localengineds.cpp
@@ -3814,8 +3814,13 @@ SmlDevInfSyncCapPtr_t TLocalEngineDS::newDevInfSyncCap(uInt32 aSyncCapMask)
//
// Worse, Nokia phones cancel direct sync sessions with an
// OBEX error ("Forbidden") when non-standard sync modes
- // are included in the SyncCap. As a workaround for that
- // we use the following logic:
+ // are included in the SyncCap.
+ // Event worse, some servers refuse to sync at
+ // all with strange/misleading error codes when extensions are found.
+ // Therefore, this is nothing to be enabled in general,
+ // so it needs to be explicitly enabled in config from
+ // 3.4.0.45 onwards (using <syncmodeextensions>yes</syncmodeextensions>
+ // If it is enabled in config, the following logic is used:
// - libsynthesis in a SyncML client will always send
// all the extended sync modes; with the Funambol
// workaround in place that works
@@ -3826,8 +3831,10 @@ SmlDevInfSyncCapPtr_t TLocalEngineDS::newDevInfSyncCap(uInt32 aSyncCapMask)
//
// Corresponding code in TRemoteDataStore::setDatastoreDevInf().
//
- if (!IS_SERVER ||
- fSessionP->receivedSyncModeExtensions()) {
+ if (
+ fSessionP->getSessionConfig()->fSyncModeExtensions && // must be enabled in config
+ (!IS_SERVER || fSessionP->receivedSyncModeExtensions()) // and if, server only uses it with clients which have it in their devInf as well
+ ) {
bool extended=false;
if (canRestart()) {
synctypeP=newPCDataString("390001");
diff --git a/src/sysync/stdlogicds.cpp b/src/sysync/stdlogicds.cpp
index 4b88095..7f9eb9c 100644
--- a/src/sysync/stdlogicds.cpp
+++ b/src/sysync/stdlogicds.cpp
@@ -1537,6 +1537,7 @@ localstatus TStdLogicDS::dsBeforeStateChange(TLocalEngineDSState aOldState,TLoca
sta = startDataWrite();
}
} // client
+ #ifdef SYSYNC_SERVER
if (aNewState==dssta_serverseenclientmods) {
// Can only happen in server. Implement removal of unmatched items
// when in caching mode.
@@ -1565,6 +1566,7 @@ localstatus TStdLogicDS::dsBeforeStateChange(TLocalEngineDSState aOldState,TLoca
}
}
}
+ #endif // SYSYNC_SERVER
if (aNewState==dssta_completed && !isAborted()) {
// finish writing data now anyway
endDataWrite();
diff --git a/src/sysync/syncagent.cpp b/src/sysync/syncagent.cpp
index 11ea6ac..8e85bca 100755
--- a/src/sysync/syncagent.cpp
+++ b/src/sysync/syncagent.cpp
@@ -3957,7 +3957,7 @@ TSyError writeDebugMsg(
-// accessor table for server session key
+// accessor table for session key
static const TStructFieldInfo ServerParamFieldInfos[] =
{
// valName, valType, writable, fieldOffs, valSiz
diff --git a/src/sysync/synccommand.cpp b/src/sysync/synccommand.cpp
index 65d9e8f..b7e8ae6 100755
--- a/src/sysync/synccommand.cpp
+++ b/src/sysync/synccommand.cpp
@@ -2478,8 +2478,9 @@ bool TSyncOpCommand::execute(void)
if (thisitemnode->item->data==NULL) {
PDEBUGPRINTFX(DBG_ERROR,("Chunked item has no <data>"));
statusCmdP->setStatusCode(412);
- // do not further process the command, exit item loop
- break;
+ // do not further process the command, issue status and exit
+ ISSUE_COMMAND_ROOT(fSessionP,statusCmdP);
+ return true; // processed (with error)
}
// - return appropriate status
statusCmdP = newStatusCommand(213); // chunked item accepted and buffered
@@ -2487,8 +2488,9 @@ bool TSyncOpCommand::execute(void)
if (thisitemnode->next) {
PDEBUGPRINTFX(DBG_ERROR,("Chunked item had additional items after the chunked one"));
statusCmdP->setStatusCode(400);
- // do not further process the command, exit item loop
- break;
+ // do not further process the command, issue status and exit
+ ISSUE_COMMAND_ROOT(fSessionP,statusCmdP);
+ return true; // processed (with error)
}
if (fSessionP->fIncompleteDataCommandP==NULL) {
// This is the first chunk, save this as the original command (as it contains all meta)
diff --git a/src/sysync/syncsession.cpp b/src/sysync/syncsession.cpp
index f71a2a0..37dd312 100644
--- a/src/sysync/syncsession.cpp
+++ b/src/sysync/syncsession.cpp
@@ -598,24 +598,26 @@ void TSessionConfig::clear(void)
fSimpleAuthUser.erase();
fSimpleAuthPassword.erase();
// - medium timeout
- fSessionTimeout=60; // one minute, will be overridden by derived classes
+ fSessionTimeout = 60; // one minute, will be overridden by derived classes
// - set default maximum SyncML version enabled
- fMaxSyncMLVersionSupported=MAX_SYNCML_VERSION;
+ fMaxSyncMLVersionSupported = MAX_SYNCML_VERSION;
// - minimum is 1.0
fMinSyncMLVersionSupported=syncml_vers_1_0;
// - accept server-alerted codes by default
- fAcceptServerAlerted=true;
+ fAcceptServerAlerted = true;
// - defaults for remote-rule configurable behaviour
- fUpdateClientDuringSlowsync=false; // do not update client records during slowsync (but do it for first sync!)
- fUpdateServerDuringSlowsync=false; // do not update server records during NON-FIRST-TIME slowsync (but do it for first sync!)
- fAllowMessageRetries=true; // generally allow retries
- fCompleteFromClientOnly=false; // default to standard-compliant behaviour.
- fRequestMaxTime=0; // no limit by default
- fRequestMinTime=0; // no minimal request processing delay
+ fUpdateClientDuringSlowsync = false; // do not update client records during slowsync (but do it for first sync!)
+ fUpdateServerDuringSlowsync = false; // do not update server records during NON-FIRST-TIME slowsync (but do it for first sync!)
+ fAllowMessageRetries = true; // generally allow retries
+ fCompleteFromClientOnly = false; // default to standard-compliant behaviour.
+ fRequestMaxTime = 0; // no limit by default
+ fRequestMinTime = 0; // no minimal request processing delay
// - default value for flag to send property lists in CTCap
- fShowCTCapProps=true;
+ fShowCTCapProps = true;
// - default value for flag to send type/size in CTCap for SyncML 1.0 (disable as old clients like S55 crash on this)
- fShowTypeSzInCTCap10=false;
+ fShowTypeSzInCTCap10 = false;
+ // - sync mode extensions may be needed for SyncEvolution, but are causing troubles with Nokia phones and some servers so these are off by default
+ fSyncModeExtensions = false;
if (IS_CLIENT) {
// - Synthesis clients always behaved like that (sending 23:59:59), so we'll keep it as a default
fVCal10EnddatesSameDay = true;
@@ -759,6 +761,8 @@ bool TSessionConfig::localStartElement(const char *aElementName, const char **aA
expectBool(fShowCTCapProps);
else if (strucmp(aElementName,"showtypesizeinctcap10")==0)
expectBool(fShowTypeSzInCTCap10);
+ else if (strucmp(aElementName,"syncmodeextensions")==0)
+ expectBool(fSyncModeExtensions);
else if (strucmp(aElementName,"autoenddateinclusive")==0)
expectBool(fVCal10EnddatesSameDay);
else if (strucmp(aElementName,"donotfoldcontent")==0)
diff --git a/src/sysync/syncsession.h b/src/sysync/syncsession.h
index fe882a3..3bb5cb8 100755
--- a/src/sysync/syncsession.h
+++ b/src/sysync/syncsession.h
@@ -225,6 +225,8 @@ public:
bool fShowCTCapProps;
// default value for flag to send type/size in CTCap for SyncML 1.0 (disable as old clients like S55 crash on this)
bool fShowTypeSzInCTCap10;
+ // flag to enable SyncEvolution-specific sync mode extensions in outgoing devInf.
+ bool fSyncModeExtensions;
// default value for sending end date-only values (like DTEND) as last time unit of previous day (i.e. 23:59:59, inclusive)
// instead of midnight of next day (exclusive, like in iCalendar 2.0)
bool fVCal10EnddatesSameDay;
diff --git a/src/sysync_SDK/sdk_sources_cocoa/dbplugin_cocoa.h b/src/sysync_SDK/sdk_sources_cocoa/dbplugin_cocoa.h
index d4a59fe..ce557da 100644
--- a/src/sysync_SDK/sdk_sources_cocoa/dbplugin_cocoa.h
+++ b/src/sysync_SDK/sdk_sources_cocoa/dbplugin_cocoa.h
@@ -123,6 +123,8 @@ PLUGIN_NS_END
- (void)debugEndThread;
// access to CB
- (DB_Callback)getCB;
+// open a key from root level (same functionality as SyncEngine's newOpenKeyByPath
+- (SettingsKey *)newOpenKeyByPath:(cAppCharP)aPath withMode:(uInt16)aMode err:(TSyError *)aErrP;
// access to session key
- (SettingsKey *)newOpenSessionKeyWithMode:(uInt16)aMode err:(TSyError *)aErrP;
// Context features
diff --git a/src/sysync_SDK/sdk_sources_cocoa/dbplugin_cocoa.m b/src/sysync_SDK/sdk_sources_cocoa/dbplugin_cocoa.m
index d728e71..352d4bf 100644
--- a/src/sysync_SDK/sdk_sources_cocoa/dbplugin_cocoa.m
+++ b/src/sysync_SDK/sdk_sources_cocoa/dbplugin_cocoa.m
@@ -570,6 +570,30 @@ PLUGIN_NS_END
}
+// open a key from root level
+- (SettingsKey *)newOpenKeyByPath:(cAppCharP)aPath withMode:(uInt16)aMode err:(TSyError *)aErrP
+{
+ TSyError sta=LOCERR_OK;
+ KeyH newKeyH=NULL;
+ SettingsKey *newKey=nil; // no object by default
+ OpenKeyByPath_Func OpenKeyByPath = fCB->ui.OpenKeyByPath;
+ if (!OpenKeyByPath) {
+ sta=LOCERR_NOTIMP;
+ }
+ else {
+ // open from root (no parent)
+ sta = OpenKeyByPath(fCB,&newKeyH,NULL,aPath,aMode);
+ if (sta==LOCERR_OK) {
+ newKey=[[SettingsKey alloc] initWithCI:fCB andKeyHandle:newKeyH];
+ DBGNSLOG(@"Opened settings key %s : SettingsKey object = 0x%lX",aPath,(intptr_t)newKey);
+ }
+ }
+ if (aErrP) *aErrP=sta;
+ return newKey;
+} // newOpenKeyByPath
+
+
+
// Dummy implementation - should be overridden in actual DB implementations in subclass
- (sInt32)contextSupportRules:(cAppCharP)aContextRules
diff --git a/src/sysync_ios.xcodeproj/project.pbxproj b/src/sysync_ios.xcodeproj/project.pbxproj
index f5a1fb2..012c604 100644
--- a/src/sysync_ios.xcodeproj/project.pbxproj
+++ b/src/sysync_ios.xcodeproj/project.pbxproj
@@ -1770,7 +1770,7 @@
29B97313FDCFA39411CA2CEA /* Project object */ = {
isa = PBXProject;
attributes = {
- LastUpgradeCheck = 0440;
+ LastUpgradeCheck = 0450;
ORGANIZATIONNAME = plan44.ch;
};
buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "sysync_ios" */;
diff --git a/src/sysync_ios.xcodeproj/xcshareddata/xcschemes/static_clientEngine_opensource_ios.xcscheme b/src/sysync_ios.xcodeproj/xcshareddata/xcschemes/static_clientEngine_opensource_ios.xcscheme
index 13316e8..5fb35d0 100644
--- a/src/sysync_ios.xcodeproj/xcshareddata/xcschemes/static_clientEngine_opensource_ios.xcscheme
+++ b/src/sysync_ios.xcodeproj/xcshareddata/xcschemes/static_clientEngine_opensource_ios.xcscheme
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
- LastUpgradeVersion = "0440"
+ LastUpgradeVersion = "0450"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
@@ -38,7 +38,6 @@
buildConfiguration = "Debug"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
- enableOpenGLFrameCaptureMode = "0"
allowLocationSimulation = "YES">
<AdditionalOptions>
</AdditionalOptions>
diff --git a/src/sysync_ios.xcodeproj/xcshareddata/xcschemes/static_combiEngine_opensource_ios.xcscheme b/src/sysync_ios.xcodeproj/xcshareddata/xcschemes/static_combiEngine_opensource_ios.xcscheme
index 348f68c..ee1fb4b 100644
--- a/src/sysync_ios.xcodeproj/xcshareddata/xcschemes/static_combiEngine_opensource_ios.xcscheme
+++ b/src/sysync_ios.xcodeproj/xcshareddata/xcschemes/static_combiEngine_opensource_ios.xcscheme
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
- LastUpgradeVersion = "0440"
+ LastUpgradeVersion = "0450"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"