On Di, 2010-11-02 at 07:36 +0000, [email protected] wrote:
> On Mon, 1 Nov 2010, Patrick Ohly wrote:
> > If the phone always sends an empty string, then I can think of a
> > reasonably easy (?) workaround: fall back to the Source value when the
> > Target is empty.
> 
> Maybe, this would help.

Attached is a patch, entirely untested. Should apply to the
SyncEvolution 1.1 source archive [1].

Do you think you could try out the patch and refine it? I have no idea
whether I have patched the right location, or enough of them to complete
a sync.

> Is there a way to trace the SAN message (at least for curiosity)?

Not without adding additional code. See SyncContext::sendSAN().

-- 
Best Regards, Patrick Ohly

The content of this message is my personal opinion only and although
I am an employee of Intel, the statements I make here in no way
represent Intel's position on the issue, nor am I authorized to speak
on behalf of Intel on this matter.

diff --git a/src/sysync/syncsession.cpp b/src/sysync/syncsession.cpp
index 8c92513..161d300 100644
--- a/src/sysync/syncsession.cpp
+++ b/src/sysync/syncsession.cpp
@@ -4790,7 +4790,7 @@ TSmlCommand *TSyncSession::processAlertItem(
     case 204:
     case 205:
     // Sync resume alert
-    case 225:
+    case 225: {
       // Synchronisation initialisation alerts
       // - test if context is ok
       if (fIncomingState!=psta_init && fIncomingState!=psta_initsync) {
@@ -4804,8 +4804,13 @@ TSmlCommand *TSyncSession::processAlertItem(
         return NULL; // no alert sent back
       }
       // find requested database by URI
+      string target = smlSrcTargLocURIToCharP(aItemP->target); // target as sent from remote
+      if (target.empty()) {
+        // fallback for Sony Ericsson C510
+        target = smlSrcTargLocURIToCharP(aItemP->source);
+      }
       datastoreP = findLocalDataStoreByURI(
-        smlSrcTargLocURIToCharP(aItemP->target), // target as sent from remote
+        target.c_str(),
         &optionsCGI, // options, if any
         &identifyingTargetURI // identifying part of URI (CGI removed)
       );
@@ -4850,6 +4855,7 @@ TSmlCommand *TSyncSession::processAlertItem(
         aStatusCommand.addItem(itemP); // add it to status
       }
       break;
+    }
     case 224 :
       // Suspend alert
       SuspendSession(514);
_______________________________________________
SyncEvolution mailing list
[email protected]
http://lists.syncevolution.org/listinfo/syncevolution

Reply via email to