On Sep 15, 2011, at 14:48 , Patrick Ohly wrote: > I don't think it would help much. You could do the Wireshark thing, or, > if you are really ambitious, single-step through buildGenericCmd() in > xltdec.c while it processes the offending <Sync><Replace> part. That > should eventually bomb out somewhere with the > SML_ERR_XLT_INVAL_SYNCML_DOC error.
I built some debug printing into the SMLTK a long time ago, however the problem is that there was no easy way to pass a debug logger handle down into the C-only toolkit to actually output it. And because just printing it on the console was no option for a shared library, the corresponding output macro SMLERRPRINTFX() is doing nothing. To debug a specific case however, you might want to temporarily define that macro, for example just map it to printf(), in src/syncml_tk/src/sml/xlt/all/xltdec.c: #define SMLERRPRINTFX(lvl,m) printf m If you have access to the stdout produced while the sync runs, you'll get much useful information in case of a decoding error, including some context dump of the text being parsed, clear text error message and the routine name that caused the error. Patrick, maybe there is a better way in SyncEvolution context than just printf() that could be made into a log option for debugging decoding problems? Best Regards, Lukas Lukas Zeller, plan44.ch [email protected] - www.plan44.ch _______________________________________________ SyncEvolution mailing list [email protected] http://lists.syncevolution.org/listinfo/syncevolution
