Dear Lukas,

    Thank you so much for your great help! Your guess is completely correct and 
I have
now fixed the problem by adding initialization code in the main program.

    Now there is another problem. It has to do with the following statement in 
the main program

    C(xptGetProtocol("HTTP", &xptProtocolInfo));

    I debugged into it and then found the following segment of suspicious code 
in xptcomm.c

                transportsRegisteredSoFar = availableTransportCount;

            XPTDEBUG(("Initializing dynamically-loaded transport in library 
%s\n", libname));
            status = initFunction();
            if (status) {
               XPTDEBUG(("The initializeTransport() function of 
dynamically-loaded transport in library %s failed with return status %d\n", 
libname, (int) status));
               exitStatus = status;
            }

            if (availableTransportCount == transportsRegisteredSoFar) {
               // The library registered no new transports.  We don't need it.
               unloadLibrary(handle);
            }

`    Since transportsRegisteredSoFar and availableTransportCount are forced to 
be equal 
by the first assignment statement. An errorneous result of the above code is 
that every loaded 
dynamic-linked library will eventually be unloaded. Is it that you discarded 
the xpt part of the 
SyncML RTK and therefore the xpt part has not been maintained for years?

Best wishes,
Yiping Cheng

----- Original Message ----- 
From: "Lukas Zeller" <[email protected]>
To: "Yiping Cheng" <[email protected]>
Cc: <[email protected]>
Sent: Monday, November 23, 2009 9:49 PM
Subject: Re: [os-libsynthesis] SyncML RTK bug report (to Lucas Zeller)


Hi Yiping Cheng,

I think the example programs in the RTK are really really outdated. I've never 
used any of them during the last 9 years and I don't know anybody who has used 
them. My guess is that these examples were never used except by the original 
authors in the very beginning 
of the RTK development.

For a real-world SyncML client, much more than the RTK is needed anyway (that's 
what libsynthesis is about).

The RTK is fine for efficiently encoding/decoding SyncML messages, but nothing 
beyond that.

I can't really help with the RTK example program - but I have a quick guess 
what *could* be the problem: As the smlXXXX_t structs have evolved over time 
and got new fields, it might well be that the ancient example does not 
initialize all fields correctly which might then crash the encoder. So a Q&D 
approach could be to memset all the structs to zero, so unused fields are at 
least defined.

The encoder/decoder itself is heavily in use by all of our products, so the API 
as defined in sml.h for sure works. So I'd recommend to look at libsynthesis 
usage of the RTK and build your program accordingly.

Best Regards,

Lukas

Lukas Zeller ([email protected])
- 
Synthesis AG, SyncML Solutions  & Sustainable Software Concepts
[email protected], http://www.synthesis.ch



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

Reply via email to