On Fri, 2009-09-25 at 17:24 +0200, Patrick Ohly wrote:
> On Fri, 2009-09-25 at 16:29 +0200, Patrick Ohly wrote:
> > At the moment I can start a sync session, but SessionStep() returns an
> > error at some point. Need to look more closely into that before I can
> > say more...
> 
> I need to adapt to the reversed order of GOTDATA/NEEDDATA. Stay tuned...

I get a segfault now:

1439              else if (getEncoding()!=enc) {
1440                    // already known encoding does not match actual encoding
1441                PDEBUGPRINTFX(DBG_ERROR,(
1442                    "Warning: Incoming data encoding mismatch: expected=%s, 
found=%s",
1443                  SyncMLEncodingNames[getEncoding()],
1444                  SyncMLEncodingNames[enc]
1445                ));
(gdb) p enc
$1 = SML_WBXML
(gdb) p this
$3 = (class sysync::TSyncServer * const) 0xd74b00
(gdb) p *this
Reading in symbols for 
/home/patrick/projects/libsynthesis/src/DB_interfaces/api_db/pluginapiagent.cpp...done.
$4 = {<sysync::TSyncSession> = {_vptr.TSyncSession = 0x7fbc5f07ccf0, fDumpCount 
= 0, 
    fOutgoingXMLInstance = 0x0, fIncomingXMLInstance = 0x0, fXMLtranslate = 
false, fMsgDump = false, 
    fLimitedRemoteFieldLengths = false, fDontSendEmptyProperties = false, 
fDoQuote8BitContent = false, 
...
(gdb) p this->fEncoding
$5 = 14108592

I just did a WriteSyncMLBuffer() for the initial message. How would I
set the content type at that stage? Ah, the code tries to guess the
encoding if fEncoding == SML_UNDEF, except for me fEncoding seems to be
uninitialized. Setting it to SML_UNDEF in TSyncSession::TSyncSession()
fixed the problem.

I'm getting the first message exchange done, now it fails with in my
HTTP server script because I'm not handling the session ID yet (need to
follow the hints in your other email). I think this is enough for today,
though.

-- 
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.



_______________________________________________
os-libsynthesis mailing list
[email protected]
http://lists.synthesis.ch/mailman/listinfo/os-libsynthesis

Reply via email to