Hi Patrick, On Dec 16, 2009, at 16:29 , Patrick Ohly wrote:
>>> While talking about this, I didn't understand this comment in the >>> syerror.h file: >>> >>> /** local codes signalling SyncML status are shown as >>> LOCAL_STATUS_CODE+<SyncML-Statuscode> */ >>> LOCAL_STATUS_CODE = 10000 >>> >>> Does that mean that everything in the range >=10000 is a SyncML status >>> code after subtracting 10000? >> >> Not everything, but up to about 10599. The prefix is used to >> distinguish real SyncML status codes received as such (from the >> remote) from using the same codes for locally generated errors. > > Does that mean that locally generated errors, for example from the DB > layer, should be in that range? No. The 10xxx range is more like a tag to separate local from remote errors in those channels (e.g. progress events or log outputs) where both cases can occur. There are two routines in sysync_utils.cpp, syncmlError() and localError() to adjust error codes. > I don't find in the src/sysync source where LOCAL_STATUS_CODE might get > added to local status codes, and the example code (like text_db) returns > "normal" errors, like DB_Error = 510. That's correct. The conversion to localError() is not done immediately. It depends on the context where an error happens - if this DB error condition becomes a status command for the remote side, it will be used as syncmlError(), while when it leads to aborting the local session it might become a localError(). >> I'd suggest to put an app specific range to 22000..22999, as we have >> the also app-specific cURL block at 21000 and the Linux Signals block >> at 20500 already. > > I'm adding both to syerror.h in moblin.org for you to merge at the next > occasion. Ok, thanks! Best Regards, 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
