<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<id>tag:www.nabble.com,2006:forum-14407</id>
	<title>Nabble - Opensync - Dev</title>
	<updated>2008-07-04T04:50:18Z</updated>
	<link rel="self" type="application/atom+xml" href="http://www.nabble.com/Opensync---Dev-f14407.xml" />
	<link rel="alternate" type="text/html" href="http://www.nabble.com/Opensync---Dev-f14407.html" />
	<subtitle type="html">OpenSync</subtitle>
	
<entry>
	<id>tag:www.nabble.com,2006:post-18277993</id>
	<title>New libsyncml tool: OBEX cutter</title>
	<published>2008-07-04T04:50:18Z</published>
	<updated>2008-07-04T04:50:18Z</updated>
	<author>
		<name>Daniel Gollub</name>
	</author>
	<content type="html">Hi,
&lt;br&gt;&lt;br&gt;i wrote a tiny tool to cut the OBEX payload from captured SyncML traffic. For 
&lt;br&gt;easier debugging/reviewing traffic dumps - so you don't have to read OBEX 
&lt;br&gt;traffic to extract the wbxml2/SyncML bits.
&lt;br&gt;&lt;br&gt;obex-cutter could be used like this: Imagine you have a hexdump of a single 
&lt;br&gt;OBEX message:
&lt;br&gt;&lt;br&gt;libsyncml/tools&amp;gt; cat dump.hex 
&lt;br&gt;8200fdcb00000005c3000000cd4200206170706c69636174696f6e2f766e642e73796e636d6c2b7762786d6c004900d0029f536a0e73796e636d6c3a6d6574696e66006d6c7103312e310001720353796e634d4c2f312e31000165033100015b033100016e5703494d45493a46464646464646464646464646464600010167570350432053756974650001015a00014c03313034383537360001010100006b464b033100014f033230360001546e57032f74656c65636f6d2f70622e766366000101675703436f6e74616374730001015a00015303746578742f782d766361726400010100000f0101120101
&lt;br&gt;libsyncml/tools&amp;gt; cat dump.hex | ./obex-cutter &amp;gt; dump.wbxml.hex
&lt;br&gt;&lt;br&gt;# In dump.wbxml.hex the OBEX payload got stripped. Only the wbxml2 compressed 
&lt;br&gt;SyncML message is left in hex. Convert it to binary:
&lt;br&gt;&lt;br&gt;libsyncml/tools&amp;gt; osyncbinary --hex dump.wbxml.hex dump.wbxml &amp;&amp;gt; /dev/null
&lt;br&gt;&lt;br&gt;# Convert wbxml to XML
&lt;br&gt;&lt;br&gt;libsyncml/tools&amp;gt; wbxml2xml -o dump.xml dump.wbxml
&lt;br&gt;wbxml2xml succeded
&lt;br&gt;&lt;br&gt;# Ready:
&lt;br&gt;&lt;br&gt;libsyncml/tools&amp;gt; head dump.xml
&lt;br&gt;&amp;lt;?xml version=&amp;quot;1.0&amp;quot;?&amp;gt;
&lt;br&gt;&amp;lt;!DOCTYPE SyncML PUBLIC &amp;quot;-//SYNCML//DTD SyncML 
&lt;br&gt;1.1//EN&amp;quot; &amp;quot;&lt;a href=&quot;http://www.syncml.org/docs/syncml_represent_v11_20020213.dtd&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.syncml.org/docs/syncml_represent_v11_20020213.dtd&lt;/a&gt;&amp;quot;&amp;gt;
&lt;br&gt;&amp;lt;SyncML xmlns=&amp;quot;syncml:SYNCML1.1&amp;quot;&amp;gt;
&lt;br&gt;&amp;nbsp;&amp;lt;SyncHdr&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;lt;VerDTD&amp;gt;1.1&amp;lt;/VerDTD&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;lt;VerProto&amp;gt;SyncML/1.1&amp;lt;/VerProto&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;lt;SessionID&amp;gt;1&amp;lt;/SessionID&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;lt;MsgID&amp;gt;1&amp;lt;/MsgID&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;lt;Target&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp;&amp;lt;LocURI&amp;gt;IMEI:FFFFFFFFFFFFFFF&amp;lt;/LocURI&amp;gt;
&lt;br&gt;&lt;br&gt;Michael, good to go for libsyncml/tools?
&lt;br&gt;&lt;br&gt;best regards,
&lt;br&gt;Daniel
&lt;br&gt;&lt;br /&gt;[attachment removed]&lt;br /&gt;-------------------------------------------------------------------------
&lt;br&gt;Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
&lt;br&gt;Studies have shown that voting for your favorite open source project,
&lt;br&gt;along with a healthy diet, reduces your potential for chronic lameness
&lt;br&gt;and boredom. Vote Now at &lt;a href=&quot;http://www.sourceforge.net/community/cca08&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.sourceforge.net/community/cca08&lt;/a&gt;&lt;br /&gt;_______________________________________________
&lt;br&gt;Opensync-devel mailing list
&lt;br&gt;&lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=18277993&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Opensync-devel@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://lists.sourceforge.net/lists/listinfo/opensync-devel&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://lists.sourceforge.net/lists/listinfo/opensync-devel&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/New-libsyncml-tool%3A-OBEX-cutter-tp18277993p18277993.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-18193110</id>
	<title>Svn kdepim does not compile</title>
	<published>2008-06-30T03:57:52Z</published>
	<updated>2008-06-30T03:57:52Z</updated>
	<author>
		<name>Alexander Egger</name>
	</author>
	<content type="html">make reports the following error:
&lt;br&gt;&lt;br&gt;/home/aeg/local/opensync/kdepim/src/datasource.cpp:162: error:
&lt;br&gt;'osync_hashtable_report' was not declared in this scope
&lt;br&gt;&lt;br&gt;this is most likely because the according include line war removed
&lt;br&gt;from opensync_hashtable.h
&lt;br&gt;&lt;br&gt;any hints how to fix this?
&lt;br&gt;&lt;br&gt;thanks
&lt;br&gt;&lt;br&gt;alexander
&lt;br&gt;-- 
&lt;br&gt;Dr. Alexander Egger, Studiengang IT &amp; IT-Marketing
&lt;br&gt;CAMPUS 02 Fachhochschule der Wirtschaft GmbH
&lt;br&gt;Körblergasse 126, 8021 Graz, Austria/EUROPE
&lt;br&gt;T:+43 316 6002 395 M:+43 699 14102026
&lt;br&gt;&lt;br&gt;-------------------------------------------------------------------------
&lt;br&gt;Check out the new SourceForge.net Marketplace.
&lt;br&gt;It's the best place to buy or sell services for
&lt;br&gt;just about anything Open Source.
&lt;br&gt;&lt;a href=&quot;http://sourceforge.net/services/buy/index.php&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://sourceforge.net/services/buy/index.php&lt;/a&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;Opensync-devel mailing list
&lt;br&gt;&lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=18193110&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Opensync-devel@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://lists.sourceforge.net/lists/listinfo/opensync-devel&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://lists.sourceforge.net/lists/listinfo/opensync-devel&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/Svn-kdepim-does-not-compile-tp18193110p18193110.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-18131202</id>
	<title>Re: osync_xmlformat_validate() in format plugins</title>
	<published>2008-06-26T03:58:34Z</published>
	<updated>2008-06-26T03:58:34Z</updated>
	<author>
		<name>Bjoern Ricks</name>
	</author>
	<content type="html">&lt;br&gt;Hi Daniel,
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; On Thursday 19 June 2008 16:18:02 Bjoern Ricks wrote:
&lt;br&gt;&amp;gt; &amp;nbsp; 
&lt;br&gt;&amp;gt;&amp;gt; I started coding to get rid of osync_xml_validate and to have only one
&lt;br&gt;&amp;gt;&amp;gt; instance of a xml schema for each objtype. Therefore I tried to reuse
&lt;br&gt;&amp;gt;&amp;gt; the oop singleton pattern in C via a static GList. Could you please
&lt;br&gt;&amp;gt;&amp;gt; review my first intuition because I am more familiar with C++ than C.
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Thanks for looking into this!
&lt;br&gt;&amp;gt; &amp;nbsp; 
&lt;/div&gt;You are welcome ;-)
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; The idea of using C++-singleton-like sounds interesting. I wonder if we would 
&lt;br&gt;&amp;gt; change some more stuff, if this would be still required. For example make all 
&lt;br&gt;&amp;gt; OSyncXMLFormat &amp;quot;inherit&amp;quot; of OSyncXMLFormatSchema? We just force/require for 
&lt;br&gt;&amp;gt; all XMLFormats a schema file, by changing osync_xmlformat_new parameter list 
&lt;br&gt;&amp;gt; to:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; osync_xmlformat_new(const char *objtype, OSyncXMLFormatSchema *schema, 
&lt;br&gt;&amp;gt; OSyncError **error);
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; And putting an OSyncXMLFormatSchema pointer into the internal struct.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Thoughts?
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; 
&lt;/div&gt;The last days I was thinking about that and it is alway better not to 
&lt;/div&gt;use any static variables because of concurrent access. But I don't think 
&lt;br&gt;we could avoid this problem without having more schema instances in the 
&lt;br&gt;memory. If we use your solution every format plugin has to create its 
&lt;br&gt;own instance of each schema which the plugin will support. This will be 
&lt;br&gt;better than today but not really nice.
&lt;br&gt;&lt;br&gt;Maybe you can review my code again and test it. I changed the xmlformat 
&lt;br&gt;test suite to fit with the new solution, too. If my code is ok I will 
&lt;br&gt;commit it. Afterwards I take a look at the format plugins and change 
&lt;br&gt;them if necessary.
&lt;div class='shrinkable-quote'&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp;/**
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; * @brief Validate the xmlformat against its schema in inidivual path
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; * @param xmlformat The pointer to a xmlformat object
&lt;br&gt;&amp;gt;&amp;gt; @@ -399,8 +473,9 @@
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp;osync_bool osync_xmlformat_validate(OSyncXMLFormat *xmlformat)
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp;{
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; osync_assert(xmlformat);
&lt;br&gt;&amp;gt;&amp;gt; -
&lt;br&gt;&amp;gt;&amp;gt; - &amp;nbsp; &amp;nbsp; &amp;nbsp; return _osync_xmlformat_validate(xmlformat, NULL);
&lt;br&gt;&amp;gt;&amp;gt; +
&lt;br&gt;&amp;gt;&amp;gt; + &amp;nbsp; &amp;nbsp; &amp;nbsp; OSyncXMLFormatSchema * schema =
&lt;br&gt;&amp;gt;&amp;gt; osync_xmlformat_schema_get_instance(xmlformat, NULL); + &amp;nbsp; &amp;nbsp; &amp;nbsp; return
&lt;br&gt;&amp;gt;&amp;gt; osync_xmlformat_schema_validate(schema, xmlformat);
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; We should avoid code which is ignoring the error handling by passing NULL 
&lt;br&gt;&amp;gt; instead of a OSyncError reference. (I know there is/was some code doing 
&lt;br&gt;&amp;gt; so ... but we should get rid of those old code. It's just bad/wrong/....). 
&lt;br&gt;&amp;gt; Feel free to change the paramter list vor the _validate() function to 
&lt;br&gt;&amp;gt; (OSyncXMLFormat *xmlformat, OSyncError **error). You might set also an error 
&lt;br&gt;&amp;gt; when osync_xmlformat_schema_validate is false:
&lt;br&gt;&amp;gt; osync_error_set(*error, OSYNC_ERROR_GENERIC /*or something different */, &amp;quot;XML 
&lt;br&gt;&amp;gt; Format validation failed.&amp;quot;);
&lt;br&gt;&amp;gt; &amp;nbsp; 
&lt;/div&gt;changed.
&lt;/div&gt;-- 
&lt;br&gt;/Bjoern Ricks
&lt;br&gt;&lt;br /&gt;Index: opensync/xmlformat/opensync_xmlformat.c
&lt;br&gt;===================================================================
&lt;br&gt;--- opensync/xmlformat/opensync_xmlformat.c	(Revision 3381)
&lt;br&gt;+++ opensync/xmlformat/opensync_xmlformat.c	(Arbeitskopie)
&lt;br&gt;@@ -97,6 +97,7 @@
&lt;br&gt;&amp;nbsp; * @param path The individual schema path. If NULL the default OPENSYNC_SCHEMASDIR is used.
&lt;br&gt;&amp;nbsp; * @return TRUE if xmlformat valid else FALSE
&lt;br&gt;&amp;nbsp; */
&lt;br&gt;+/*
&lt;br&gt;&amp;nbsp;osync_bool _osync_xmlformat_validate(OSyncXMLFormat *xmlformat, const char *path)
&lt;br&gt;&amp;nbsp;{
&lt;br&gt;&amp;nbsp;	osync_assert(xmlformat);
&lt;br&gt;@@ -111,8 +112,141 @@
&lt;br&gt;&amp;nbsp; 	g_free(schemafilepath);
&lt;br&gt;&amp;nbsp;	
&lt;br&gt;&amp;nbsp;	return res;
&lt;br&gt;+} */
&lt;br&gt;+
&lt;br&gt;+/**
&lt;br&gt;+ * @brief Create new OSyncXMLFormatSchema for xmlformat
&lt;br&gt;+ * @param xmlformat The pointer to a xmlformat object. xmlformat-&amp;gt;objtype is used to identify the schema file
&lt;br&gt;+ * @param path The individual schema path. If NULL the default OPENSYNC_SCHEMASDIR is used.
&lt;br&gt;+ * @param error The error which will hold the info in case of an error
&lt;br&gt;+ * @return new OSyncXMLFormatSchema or NULL in case of an error
&lt;br&gt;+ */
&lt;br&gt;+OSyncXMLFormatSchema * osync_xmlformat_schema_new(OSyncXMLFormat * xmlformat, const char *path, OSyncError **error) {
&lt;br&gt;+	OSyncXMLFormatSchema * osyncschema = NULL;
&lt;br&gt;+	
&lt;br&gt;+	osync_trace(TRACE_ENTRY, &amp;quot;%s(%p, %p, %p)&amp;quot;, __func__, xmlformat, path, error);
&lt;br&gt;+	
&lt;br&gt;+	osync_assert(xmlformat);
&lt;br&gt;+	
&lt;br&gt;+	osyncschema = osync_try_malloc0(sizeof(OSyncXMLFormatSchema), error);
&lt;br&gt;+	if(!osyncschema) {
&lt;br&gt;+		osync_trace(TRACE_EXIT_ERROR, &amp;quot;%s: %s&amp;quot; , __func__, osync_error_print(error));
&lt;br&gt;+		// release mutex
&lt;br&gt;+		return NULL;
&lt;br&gt;+	}
&lt;br&gt;+	osyncschema-&amp;gt;objtype = g_strdup(osync_xmlformat_get_objtype(xmlformat));
&lt;br&gt;+	char *schemafilepath = g_strdup_printf(&amp;quot;%s%c%s%s%s&amp;quot;,
&lt;br&gt;+		path ? path : OPENSYNC_SCHEMASDIR,
&lt;br&gt;+		G_DIR_SEPARATOR,
&lt;br&gt;+		&amp;quot;xmlformat-&amp;quot;,
&lt;br&gt;+		osyncschema-&amp;gt;objtype,
&lt;br&gt;+		&amp;quot;.xsd&amp;quot;);
&lt;br&gt;+	
&lt;br&gt;+ 	xmlSchemaParserCtxtPtr xmlSchemaParserCtxt;
&lt;br&gt;+ 	xmlSchemaPtr xmlSchema;
&lt;br&gt;+ 	xmlSchemaValidCtxtPtr xmlSchemaValidCtxt;
&lt;br&gt;+	
&lt;br&gt;+ 	xmlSchemaParserCtxt = xmlSchemaNewParserCtxt(schemafilepath);
&lt;br&gt;+ 	osyncschema-&amp;gt;schema = xmlSchemaParse(xmlSchemaParserCtxt);
&lt;br&gt;+ 	xmlSchemaFreeParserCtxt(xmlSchemaParserCtxt);
&lt;br&gt;+
&lt;br&gt;+ 	osyncschema-&amp;gt;context = xmlSchemaNewValidCtxt(osyncschema-&amp;gt;schema);
&lt;br&gt;+ 	if (osyncschema-&amp;gt;context == NULL) {
&lt;br&gt;+ 		xmlSchemaFree(osyncschema-&amp;gt;schema);
&lt;br&gt;+ 		g_free(osyncschema-&amp;gt;objtype);
&lt;br&gt;+ 		g_free(osyncschema);
&lt;br&gt;+ 		osyncschema = NULL;
&lt;br&gt;+ 		osync_error_set(error, OSYNC_ERROR_GENERIC, &amp;quot;XMLFormat validation failed. Could not create Schema Context.&amp;quot;);
&lt;br&gt;+ 	}
&lt;br&gt;+ 	return osyncschema;
&lt;br&gt;&amp;nbsp;}
&lt;br&gt;&amp;nbsp;
&lt;br&gt;+/**
&lt;br&gt;+ * @brief Free existing OSyncXMLFormatSchema
&lt;br&gt;+ * @param osyncschema Pointer to the Schema that shoud be freed
&lt;br&gt;+ * @param error The error which will hold the info in case of an error
&lt;br&gt;+ */
&lt;br&gt;+void osync_xmlformat_schema_free(OSyncXMLFormatSchema * osyncschema) {
&lt;br&gt;+	
&lt;br&gt;+	osync_assert(osyncschema);
&lt;br&gt;+	
&lt;br&gt;+	xmlSchemaFreeValidCtxt(osyncschema-&amp;gt;context);
&lt;br&gt;+	xmlSchemaFree(osyncschema-&amp;gt;schema);
&lt;br&gt;+	g_free(osyncschema-&amp;gt;objtype);
&lt;br&gt;+	g_free(osyncschema);
&lt;br&gt;+	
&lt;br&gt;+}
&lt;br&gt;+
&lt;br&gt;+/**
&lt;br&gt;+ * @brief Get a &amp;nbsp;schema for the xmlformat.
&lt;br&gt;+ *
&lt;br&gt;+ * This function creates only one instance of a schema for each objtype. If a xmlformat is passed as a parameter with the same
&lt;br&gt;+ * objtype as a xmlformat prior the returned pointer to a OSyncXMLFormatSchema instance is the same as before.
&lt;br&gt;+ *
&lt;br&gt;+ * @param xmlformat The pointer to a xmlformat object 
&lt;br&gt;+ * @param error The error which will hold the info in case of an error
&lt;br&gt;+ * @return Pointer to a instance of OSyncXMLFormatSchema
&lt;br&gt;+ */
&lt;br&gt;+
&lt;br&gt;+OSyncXMLFormatSchema * osync_xmlformat_schema_get_instance(OSyncXMLFormat * xmlformat, OSyncError **error) {
&lt;br&gt;+	static GList * schemas = NULL;
&lt;br&gt;+	static GStaticMutex mutex = G_STATIC_MUTEX_INIT;
&lt;br&gt;+	OSyncXMLFormatSchema * osyncschema = NULL;
&lt;br&gt;+	GList * entry;
&lt;br&gt;+	const char * objtype;
&lt;br&gt;+	
&lt;br&gt;+	osync_trace(TRACE_ENTRY, &amp;quot;%s(%p, %p)&amp;quot;, __func__, xmlformat, error);
&lt;br&gt;+	
&lt;br&gt;+	osync_assert(xmlformat);
&lt;br&gt;+	
&lt;br&gt;+	objtype = osync_xmlformat_get_objtype(xmlformat);
&lt;br&gt;+	// get mutex
&lt;br&gt;+	g_static_mutex_lock(&amp;mutex);
&lt;br&gt;+	// find schema for objtype
&lt;br&gt;+	for ( entry = schemas; entry != NULL; entry=entry-&amp;gt;next) { // should be fast enough for only a few objtypes
&lt;br&gt;+		osyncschema = (OSyncXMLFormatSchema *) entry-&amp;gt;data;
&lt;br&gt;+		if (!strcmp(osyncschema-&amp;gt;objtype, objtype) ) {
&lt;br&gt;+			return osyncschema;
&lt;br&gt;+		}
&lt;br&gt;+		osyncschema = NULL;
&lt;br&gt;+	}
&lt;br&gt;+	if ( osyncschema == NULL ) {
&lt;br&gt;+		osyncschema = osync_xmlformat_schema_new(xmlformat, NULL, error);
&lt;br&gt;+		if ( osyncschema != NULL ) {
&lt;br&gt;+			schemas = g_list_append(schemas, osyncschema);
&lt;br&gt;+		}
&lt;br&gt;+	}
&lt;br&gt;+	// release mutex
&lt;br&gt;+	g_static_mutex_unlock(&amp;mutex);
&lt;br&gt;+	return osyncschema;	
&lt;br&gt;+}
&lt;br&gt;+
&lt;br&gt;+/**
&lt;br&gt;+ * @brief Validate the xmlformat against its schema
&lt;br&gt;+ * @param xmlformat The pointer to a xmlformat object 
&lt;br&gt;+ * @param schema The pointer to a OSyncXMLFormatSchema object.
&lt;br&gt;+ * @param error The error which will hold the info in case of an error
&lt;br&gt;+ * @return TRUE if xmlformat valid else FALSE
&lt;br&gt;+ */
&lt;br&gt;+
&lt;br&gt;+osync_bool osync_xmlformat_schema_validate(OSyncXMLFormatSchema * schema, OSyncXMLFormat * xmlformat, OSyncError **error)
&lt;br&gt;+{
&lt;br&gt;+	osync_assert(xmlformat);
&lt;br&gt;+	osync_assert(schema);
&lt;br&gt;+	
&lt;br&gt;+	int rc = 0;
&lt;br&gt;+
&lt;br&gt;+	/* Validate the document */
&lt;br&gt;+	rc = xmlSchemaValidateDoc(schema-&amp;gt;context, xmlformat-&amp;gt;doc);
&lt;br&gt;+
&lt;br&gt;+	if(rc != 0) {
&lt;br&gt;+		osync_error_set(error, OSYNC_ERROR_GENERIC, &amp;quot;XMLFormat validation failed.&amp;quot;);
&lt;br&gt;+ 		return FALSE;
&lt;br&gt;+	}
&lt;br&gt;+	return TRUE;
&lt;br&gt;+}
&lt;br&gt;+
&lt;br&gt;+
&lt;br&gt;&amp;nbsp;/*@}*/
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp;/**
&lt;br&gt;@@ -394,13 +528,15 @@
&lt;br&gt;&amp;nbsp;/**
&lt;br&gt;&amp;nbsp; * @brief Validate the xmlformat against its schema
&lt;br&gt;&amp;nbsp; * @param xmlformat The pointer to a xmlformat object 
&lt;br&gt;+ * @param error The error which will hold the info in case of an error
&lt;br&gt;&amp;nbsp; * @return TRUE if xmlformat valid else FALSE
&lt;br&gt;&amp;nbsp; */
&lt;br&gt;-osync_bool osync_xmlformat_validate(OSyncXMLFormat *xmlformat)
&lt;br&gt;+osync_bool osync_xmlformat_validate(OSyncXMLFormat *xmlformat, OSyncError **error)
&lt;br&gt;&amp;nbsp;{
&lt;br&gt;&amp;nbsp;	osync_assert(xmlformat);
&lt;br&gt;-
&lt;br&gt;-	return _osync_xmlformat_validate(xmlformat, NULL);
&lt;br&gt;+	
&lt;br&gt;+	OSyncXMLFormatSchema * schema = osync_xmlformat_schema_get_instance(xmlformat, error);
&lt;br&gt;+	return osync_xmlformat_schema_validate(schema, xmlformat, error);
&lt;br&gt;&amp;nbsp;}
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp;/**
&lt;br&gt;Index: opensync/xmlformat/opensync_xmlformat_internals.h
&lt;br&gt;===================================================================
&lt;br&gt;--- opensync/xmlformat/opensync_xmlformat_internals.h	(Revision 3381)
&lt;br&gt;+++ opensync/xmlformat/opensync_xmlformat_internals.h	(Arbeitskopie)
&lt;br&gt;@@ -23,7 +23,9 @@
&lt;br&gt;&amp;nbsp;#ifndef OPENSYNC_XMLFORMAT_INTERNALS_H_
&lt;br&gt;&amp;nbsp;#define OPENSYNC_XMLFORMAT_INTERNALS_H_
&lt;br&gt;&amp;nbsp;
&lt;br&gt;-#include &amp;lt;opensync/opensync_xml.h&amp;gt;
&lt;br&gt;+#include &amp;lt;libxml/xpath.h&amp;gt;
&lt;br&gt;+#include &amp;lt;libxml/xmlschemas.h&amp;gt;
&lt;br&gt;+#include &amp;lt;libxml/tree.h&amp;gt;
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp;/** 
&lt;br&gt;&amp;nbsp; * @brief Represent a XMLFormat object
&lt;br&gt;@@ -45,7 +47,24 @@
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp;};
&lt;br&gt;&amp;nbsp;
&lt;br&gt;+/** 
&lt;br&gt;+ * @brief Represents a Schema object
&lt;br&gt;+ * @ingroup OSyncXMLFormatPrivateAPI
&lt;br&gt;+ */
&lt;br&gt;+typedef struct OSyncXMLFormatSchema {
&lt;br&gt;+	/** The schema object */
&lt;br&gt;+	xmlSchemaPtr schema;
&lt;br&gt;+	/** The schema validation context */
&lt;br&gt;+	xmlSchemaValidCtxtPtr context;
&lt;br&gt;+	/** The object type of OSyncXMLFormat */
&lt;br&gt;+	char * objtype;
&lt;br&gt;+} OSyncXMLFormatSchema;
&lt;br&gt;+
&lt;br&gt;&amp;nbsp;int _osync_xmlformat_get_points(OSyncXMLPoints points[], int* cur_pos, int basic_points, const char* fieldname);
&lt;br&gt;-osync_bool _osync_xmlformat_validate(OSyncXMLFormat *xmlformat, const char *path);
&lt;br&gt;&amp;nbsp;
&lt;br&gt;+OSyncXMLFormatSchema * osync_xmlformat_schema_get_instance(OSyncXMLFormat * xmlformat, OSyncError **error);
&lt;br&gt;+OSyncXMLFormatSchema * osync_xmlformat_schema_new(OSyncXMLFormat * xmlformat, const char *path, OSyncError **error); 
&lt;br&gt;+void osync_xmlformat_schema_free(OSyncXMLFormatSchema * schema);
&lt;br&gt;+osync_bool osync_xmlformat_schema_validate(OSyncXMLFormatSchema * schema, OSyncXMLFormat * xmlformat, OSyncError **error);
&lt;br&gt;+
&lt;br&gt;&amp;nbsp;#endif /*OPENSYNC_XMLFORMAT_INTERNAL_H_*/
&lt;br&gt;Index: opensync/xmlformat/opensync_xmlformat.h
&lt;br&gt;===================================================================
&lt;br&gt;--- opensync/xmlformat/opensync_xmlformat.h	(Revision 3381)
&lt;br&gt;+++ opensync/xmlformat/opensync_xmlformat.h	(Arbeitskopie)
&lt;br&gt;@@ -48,7 +48,7 @@
&lt;br&gt;&amp;nbsp;OSYNC_EXPORT OSyncXMLFieldList *osync_xmlformat_search_field(OSyncXMLFormat *xmlformat, const char *name, OSyncError **error, ...);
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp;OSYNC_EXPORT osync_bool osync_xmlformat_assemble(OSyncXMLFormat *xmlformat, char **buffer, unsigned int *size);
&lt;br&gt;-OSYNC_EXPORT osync_bool osync_xmlformat_validate(OSyncXMLFormat *xmlformat);
&lt;br&gt;+OSYNC_EXPORT osync_bool osync_xmlformat_validate(OSyncXMLFormat *xmlformat, OSyncError **error);
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp;OSYNC_EXPORT void osync_xmlformat_sort(OSyncXMLFormat *xmlformat);
&lt;br&gt;&amp;nbsp;
&lt;br&gt;Index: tests/merger-tests/check_xmlformat.c
&lt;br&gt;===================================================================
&lt;br&gt;--- tests/merger-tests/check_xmlformat.c	(Revision 3381)
&lt;br&gt;+++ tests/merger-tests/check_xmlformat.c	(Arbeitskopie)
&lt;br&gt;@@ -275,6 +275,7 @@
&lt;br&gt;&amp;nbsp;	char *buffer;
&lt;br&gt;&amp;nbsp;	unsigned int size;
&lt;br&gt;&amp;nbsp;	OSyncError *error = NULL;
&lt;br&gt;+	OSyncXMLFormatSchema *schema = NULL;
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp;	fail_unless(osync_file_read(&amp;quot;event.xml&amp;quot;, &amp;buffer, &amp;size, &amp;error), NULL);
&lt;br&gt;&amp;nbsp;	fail_unless(error == NULL, NULL);
&lt;br&gt;@@ -283,9 +284,13 @@
&lt;br&gt;&amp;nbsp;	fail_unless(error == NULL, NULL);
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp;	g_free(buffer);
&lt;br&gt;-
&lt;br&gt;-	fail_unless(_osync_xmlformat_validate(xmlformat, testbed) != FALSE, NULL);
&lt;br&gt;-
&lt;br&gt;+	schema = osync_xmlformat_schema_new(xmlformat, testbed, &amp;error);
&lt;br&gt;+	fail_if( schema == NULL );
&lt;br&gt;+	//fail_unless(_osync_xmlformat_validate(xmlformat, testbed) != FALSE, NULL);
&lt;br&gt;+	fail_unless( osync_xmlformat_schema_validate(schema, xmlformat, &amp;error) );
&lt;br&gt;+	
&lt;br&gt;+	osync_xmlformat_schema_free(schema);
&lt;br&gt;+	
&lt;br&gt;&amp;nbsp;	osync_xmlformat_unref(xmlformat);
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp;	destroy_testbed(testbed);
&lt;br&gt;&lt;br /&gt;-------------------------------------------------------------------------
&lt;br&gt;Check out the new SourceForge.net Marketplace.
&lt;br&gt;It's the best place to buy or sell services for
&lt;br&gt;just about anything Open Source.
&lt;br&gt;&lt;a href=&quot;http://sourceforge.net/services/buy/index.php&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://sourceforge.net/services/buy/index.php&lt;/a&gt;&lt;br /&gt;_______________________________________________
&lt;br&gt;Opensync-devel mailing list
&lt;br&gt;&lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=18131202&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Opensync-devel@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://lists.sourceforge.net/lists/listinfo/opensync-devel&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://lists.sourceforge.net/lists/listinfo/opensync-devel&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/osync_xmlformat_validate%28%29-in-format-plugins-tp17036168p18131202.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-18117081</id>
	<title>Re: libsyncml HTTP client support?</title>
	<published>2008-06-25T09:45:55Z</published>
	<updated>2008-06-25T09:45:55Z</updated>
	<author>
		<name>jasta</name>
	</author>
	<content type="html">Michael Bell wrote:
&lt;br&gt;&amp;gt; Hi Josh,
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; I did not make a real-life test with your code but I understand what's 
&lt;br&gt;&amp;gt; your problem :)
&lt;br&gt;I had tried this change during testing, assuming what you explained 
&lt;br&gt;below to be the case. &amp;nbsp;It still doesn't work right but I'm not sure why 
&lt;br&gt;exactly. &amp;nbsp;The flow of events looks like:
&lt;br&gt;&lt;br&gt;SML_MANAGER_SESSION_NEW
&lt;br&gt;SML_MANAGER_SESSION_FLUSH
&lt;br&gt;SML_MANAGER_CONNECT_DONE
&lt;br&gt;ds_client_init_sync_mode()
&lt;br&gt;ds_client_get_changeinfo()
&lt;br&gt;SML_MANAGER_SESSION_FINAL
&lt;br&gt;smlDsSessionDispatch(0x8062950)
&lt;br&gt;SML_MANAGER_SESSION_FLUSH
&lt;br&gt;_recv_alert_reply(status=200)
&lt;br&gt;&lt;br&gt;Using a breakpoint, I find that smlDsSessionRecvAlert is not called 
&lt;br&gt;until some point after _recv_alert_reply, however no dispatch attempts 
&lt;br&gt;are made after the one on/after SML_MANAGER_SESSION_FINAL. &amp;nbsp;No idea how 
&lt;br&gt;to proceed or why my event loop is not processing correctly.
&lt;br&gt;&lt;br&gt;&amp;nbsp;&amp;gt;-----&amp;gt; snip &amp;gt;-----&amp;gt;
&lt;br&gt;&amp;gt; P.S. yes I know that I have to cleanup the SyncML DS client code which 
&lt;br&gt;&amp;gt; still makes useless calls to SetConnectCallback :(
&lt;br&gt;Oh, OK. &amp;nbsp;I had thought that must be true, but it's nice to have it 
&lt;br&gt;confirmed so I can stop investigating that section of the code :)
&lt;br&gt;&lt;br&gt;-------------------------------------------------------------------------
&lt;br&gt;Check out the new SourceForge.net Marketplace.
&lt;br&gt;It's the best place to buy or sell services for
&lt;br&gt;just about anything Open Source.
&lt;br&gt;&lt;a href=&quot;http://sourceforge.net/services/buy/index.php&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://sourceforge.net/services/buy/index.php&lt;/a&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;Opensync-devel mailing list
&lt;br&gt;&lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=18117081&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Opensync-devel@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://lists.sourceforge.net/lists/listinfo/opensync-devel&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://lists.sourceforge.net/lists/listinfo/opensync-devel&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/libsyncml-HTTP-client-support--tp17614492p18117081.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-18107220</id>
	<title>Re: libsyncml HTTP client support?</title>
	<published>2008-06-25T01:19:52Z</published>
	<updated>2008-06-25T01:19:52Z</updated>
	<author>
		<name>Michael Bell</name>
	</author>
	<content type="html">Hi Josh,
&lt;br&gt;&lt;br&gt;I did not make a real-life test with your code but I understand what's 
&lt;br&gt;your problem :)
&lt;br&gt;&lt;br&gt;Josh Guilfoyle wrote:
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; I understand this piece as you can see more clearly in my code. &amp;nbsp;My 
&lt;br&gt;&amp;gt; point, however, is that without the SetConnectCallback callback firing, 
&lt;br&gt;&amp;gt; I have no opportunity to fit the specific SmlDsSession into my event 
&lt;br&gt;&amp;gt; loop. &amp;nbsp;That is what I meant by RecvAlert being called, but the event is 
&lt;br&gt;&amp;gt; never dispatched as smlDsSessionDispatch is not being called correctly 
&lt;br&gt;&amp;gt; by my event loop. &amp;nbsp;I am not 100% sure that this is the only problem at 
&lt;br&gt;&amp;gt; play, though. &amp;nbsp;Looking through the code I am very confused by how 
&lt;br&gt;&amp;gt; SetConnectCallback and smlDsServerSendAlert work together. &amp;nbsp;SendAlert 
&lt;br&gt;&amp;gt; seems to override the callback that SetConnectCallback had installed 
&lt;br&gt;&amp;gt; with the manager, but the SyncML plugin doesn't seem to care about this 
&lt;br&gt;&amp;gt; somehow.
&lt;/div&gt;&lt;/div&gt;First Ds means DatastoreServer and not DatasynchronizationServer. I know 
&lt;br&gt;that this is really dopey but I don't want to break the whole API to fix 
&lt;br&gt;this.
&lt;br&gt;&lt;br&gt;Second some explanations on the API logic - the interesting part ;)
&lt;br&gt;&lt;br&gt;If you create the DsServer then you must have a chance to get access to 
&lt;br&gt;a remotely initiated DsSession (especially if your an OMA DS server). 
&lt;br&gt;This is the use case of SetConnectCallback. The callback has nothing to 
&lt;br&gt;do with the transport connect. If you are an OMA DS client then you 
&lt;br&gt;don't need this callback.
&lt;br&gt;&lt;br&gt;If you are the OMA DS client then you get the DsSession from SendAlert. 
&lt;br&gt;Therefore this function replaces DsServerRecvAlert by DsSessionRecvAlert 
&lt;br&gt;at the manager (because there is already a DsSession).
&lt;br&gt;&lt;br&gt;So SendAlert sets firstds in your code and this is the place where you 
&lt;br&gt;get the used DsSession. You can start calling smlDsSessionDispatch 
&lt;br&gt;beginning with this function call.
&lt;br&gt;&lt;br&gt;So what does this means?
&lt;br&gt;&lt;br&gt;You added the required code by calling _ds_alert which does nothing else 
&lt;br&gt;then adding firstds to the array sessions. Your workaround is the 
&lt;br&gt;correct API use ;)
&lt;br&gt;&lt;br&gt;I hope this helps you a little bit.
&lt;br&gt;&lt;br&gt;Best regards
&lt;br&gt;&lt;br&gt;Michael
&lt;br&gt;&lt;br&gt;P.S. yes I know that I have to cleanup the SyncML DS client code which 
&lt;br&gt;still makes useless calls to SetConnectCallback :(
&lt;br&gt;-- 
&lt;br&gt;_______________________________________________________________
&lt;br&gt;&lt;br&gt;Michael Bell &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Humboldt-Universitaet zu Berlin
&lt;br&gt;&lt;br&gt;Tel.: +49 (0)30-2093 2482 &amp;nbsp; &amp;nbsp; &amp;nbsp; ZE Computer- und Medienservice
&lt;br&gt;Fax: &amp;nbsp;+49 (0)30-2093 2704 &amp;nbsp; &amp;nbsp; &amp;nbsp; Unter den Linden 6
&lt;br&gt;&lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=18107220&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;michael.bell@...&lt;/a&gt; &amp;nbsp; D-10099 Berlin
&lt;br&gt;_______________________________________________________________
&lt;br&gt;&lt;br&gt;X.509 CA Certificates / Wurzelzertifikate
&lt;br&gt;&lt;br&gt;&lt;a href=&quot;https://pki.pca.dfn.de/hu-berlin-ca/cgi-bin/pub/pki?cmd=getStaticPage;name=index;id=2&amp;RA_ID=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://pki.pca.dfn.de/hu-berlin-ca/cgi-bin/pub/pki?cmd=getStaticPage;name=index;id=2&amp;RA_ID=0&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;br /&gt;--- syncml-client.c.org	2008-06-25 10:03:59.999703658 +0200
&lt;br&gt;+++ syncml-client.c	2008-06-25 10:18:04.395754210 +0200
&lt;br&gt;@@ -133,7 +133,7 @@
&lt;br&gt;&amp;nbsp;	 &amp;nbsp;last, next, _recv_alert_reply, NULL, &amp;err);
&lt;br&gt;&amp;nbsp;	assert(firstds != NULL);
&lt;br&gt;&amp;nbsp;
&lt;br&gt;-	_ds_alert(firstds, NULL);
&lt;br&gt;+	sessions = g_list_append(sessions, firstds);
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp;	smlDsSessionGetAlert(firstds, _ds_client_recv_alert, NULL);
&lt;br&gt;&amp;nbsp;	smlSessionFlush(first, TRUE, NULL);
&lt;br&gt;&lt;br /&gt; &lt;br /&gt;-------------------------------------------------------------------------
&lt;br&gt;Check out the new SourceForge.net Marketplace.
&lt;br&gt;It's the best place to buy or sell services for
&lt;br&gt;just about anything Open Source.
&lt;br&gt;&lt;a href=&quot;http://sourceforge.net/services/buy/index.php&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://sourceforge.net/services/buy/index.php&lt;/a&gt;&lt;br /&gt;_______________________________________________
&lt;br&gt;Opensync-devel mailing list
&lt;br&gt;&lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=18107220&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Opensync-devel@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://lists.sourceforge.net/lists/listinfo/opensync-devel&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://lists.sourceforge.net/lists/listinfo/opensync-devel&lt;/a&gt;&lt;br&gt;&lt;div class=&quot;small&quot;&gt;&lt;br/&gt;&lt;img src=&quot;http://www.nabble.com/images/icon_attachment.gif&quot; &gt; &lt;strong&gt;smime.p7s&lt;/strong&gt; (7K) &lt;a href=&quot;http://www.nabble.com/attachment/18107220/0/smime.p7s&quot; target=&quot;_top&quot;&gt;Download Attachment&lt;/a&gt;&lt;/div&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/libsyncml-HTTP-client-support--tp17614492p18107220.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-18077411</id>
	<title>Re: libsyncml HTTP client support?</title>
	<published>2008-06-23T13:13:04Z</published>
	<updated>2008-06-23T13:13:04Z</updated>
	<author>
		<name>jasta</name>
	</author>
	<content type="html">Yes, sorry, the attachment was missing. &amp;nbsp;I've corrected that here. &amp;nbsp;See 
&lt;br&gt;below for further response.
&lt;br&gt;&lt;br&gt;Michael Bell wrote:
&lt;div class='shrinkable-quote'&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Josh Guilfoyle wrote:
&lt;br&gt;&amp;gt;&amp;gt; I've been looking into this more and ran into a problem that is not 
&lt;br&gt;&amp;gt;&amp;gt; apparent from the opensync plugin. &amp;nbsp;I have attached code I extracted 
&lt;br&gt;&amp;gt;&amp;gt; in order to form a very simple functional test of libsyncml operating 
&lt;br&gt;&amp;gt;&amp;gt; as a client to my server, also using libsyncml. &amp;nbsp;You should be able 
&lt;br&gt;&amp;gt;&amp;gt; to trivially modify it to connect to your own local test server and I 
&lt;br&gt;&amp;gt;&amp;gt; expect you will see the same results.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; I think the attachment is missing ;)
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Before I start a short warning: I do not develop the code. I only 
&lt;br&gt;&amp;gt; interpret it. So I'm sorry if I'm not fully correct and I hope some 
&lt;br&gt;&amp;gt; more longstanding developers of OpenSync read and check this reply too.
&lt;br&gt;&amp;gt;
&lt;/div&gt;Thanks, I really appreciate the effort to help me here. &amp;nbsp;There probably 
&lt;/div&gt;aren't a lot of folks using libsyncml as I am, so I can appreciate that 
&lt;br&gt;my questions seem odd.
&lt;div class='shrinkable-quote'&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt;&amp;gt; What is happening is that the client is connecting, sending the 
&lt;br&gt;&amp;gt;&amp;gt; &amp;lt;Alert&amp;gt;, which is responded to by the server, which also sends its 
&lt;br&gt;&amp;gt;&amp;gt; anticipated &amp;lt;Alert&amp;gt;. &amp;nbsp;However, _ds_client_recv_alert is not 
&lt;br&gt;&amp;gt;&amp;gt; triggered. &amp;nbsp;Analyzing the log file, I see that smlDsSessionRecvAlert 
&lt;br&gt;&amp;gt;&amp;gt; *is* called, but no corresponding smlDsSessionDispatch to get the 
&lt;br&gt;&amp;gt;&amp;gt; callback and response processed. &amp;nbsp;Similarly, _ds_alert (from 
&lt;br&gt;&amp;gt;&amp;gt; smlDsServerSetConnectCallback) is never triggered, which could be the 
&lt;br&gt;&amp;gt;&amp;gt; reason why smlDsSessionDispatch didn't occur as expected.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; smlDsSessionRecvAlert is only used to signal the received alert. This 
&lt;br&gt;&amp;gt; function is usually registered at the manager and called by the 
&lt;br&gt;&amp;gt; manager. This function mainly build the response.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; smlDsSessionDispatch is the real dispatcher. libsyncml uses glib's 
&lt;br&gt;&amp;gt; mechanisms for event management here. It creates a GSource and 
&lt;br&gt;&amp;gt; registers it together with some functions at a context. glib loops on 
&lt;br&gt;&amp;gt; the context and calls the dispatch function from time to time.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; If you don't want to implement it this way then you can write some 
&lt;br&gt;&amp;gt; kind of while or for loop which call smlDsSessionDispatch.
&lt;/div&gt;&lt;/div&gt;I understand this piece as you can see more clearly in my code. &amp;nbsp;My 
&lt;br&gt;point, however, is that without the SetConnectCallback callback firing, 
&lt;br&gt;I have no opportunity to fit the specific SmlDsSession into my event 
&lt;br&gt;loop. &amp;nbsp;That is what I meant by RecvAlert being called, but the event is 
&lt;br&gt;never dispatched as smlDsSessionDispatch is not being called correctly 
&lt;br&gt;by my event loop. &amp;nbsp;I am not 100% sure that this is the only problem at 
&lt;br&gt;play, though. &amp;nbsp;Looking through the code I am very confused by how 
&lt;br&gt;SetConnectCallback and smlDsServerSendAlert work together. &amp;nbsp;SendAlert 
&lt;br&gt;seems to override the callback that SetConnectCallback had installed 
&lt;br&gt;with the manager, but the SyncML plugin doesn't seem to care about this 
&lt;br&gt;somehow.
&lt;br&gt;&lt;br&gt;Anyway, the code should make it more clear how I am utilizing this area 
&lt;br&gt;of libsyncml. &amp;nbsp;I tried to copy the opensync syncml plugin closely to 
&lt;br&gt;build a simple test.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; @Daniel: I hope the explanation is correct. I'm not a glib expert. I 
&lt;br&gt;&amp;gt; only read and interpret the syncml plugin code.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Best regards
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Michael
&lt;br&gt;&lt;br&gt;&lt;br /&gt;/*
&lt;br&gt;&amp;nbsp;* $Id$
&lt;br&gt;&amp;nbsp;*
&lt;br&gt;&amp;nbsp;* Copyright (C) 2008 Josh Guilfoyle &amp;lt;&lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=18077411&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;jasta@...&lt;/a&gt;&amp;gt;
&lt;br&gt;&amp;nbsp;*
&lt;br&gt;&amp;nbsp;* This program is free software; you can redistribute it and/or modify it
&lt;br&gt;&amp;nbsp;* under the terms of the GNU General Public License as published by the
&lt;br&gt;&amp;nbsp;* Free Software Foundation; either version 2, or (at your option) any
&lt;br&gt;&amp;nbsp;* later version.
&lt;br&gt;&amp;nbsp;*
&lt;br&gt;&amp;nbsp;* This program is distributed in the hope that it will be useful, but
&lt;br&gt;&amp;nbsp;* WITHOUT ANY WARRANTY; without even the implied warranty of
&lt;br&gt;&amp;nbsp;* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. &amp;nbsp;See the GNU
&lt;br&gt;&amp;nbsp;* General Public License for more details.
&lt;br&gt;&amp;nbsp;*/
&lt;br&gt;&lt;br&gt;#include &amp;lt;stdio.h&amp;gt;
&lt;br&gt;#include &amp;lt;stdlib.h&amp;gt;
&lt;br&gt;#include &amp;lt;string.h&amp;gt;
&lt;br&gt;&lt;br&gt;#include &amp;lt;assert.h&amp;gt;
&lt;br&gt;&lt;br&gt;#define __STDC_FORMAT_MACROS
&lt;br&gt;#include &amp;lt;inttypes.h&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;/* PRIx32 */
&lt;br&gt;&lt;br&gt;#include &amp;lt;glib.h&amp;gt;
&lt;br&gt;#include &amp;lt;glib-object.h&amp;gt;
&lt;br&gt;&lt;br&gt;#include &amp;lt;libsyncml/syncml.h&amp;gt;
&lt;br&gt;#include &amp;lt;libsyncml/sml_auth.h&amp;gt;
&lt;br&gt;#include &amp;lt;libsyncml/sml_ds_server.h&amp;gt;
&lt;br&gt;&lt;br&gt;#include &amp;lt;libsyncml/http_client.h&amp;gt;
&lt;br&gt;&lt;br&gt;#include &amp;lt;libsyncml/sml_devinf_obj.h&amp;gt;
&lt;br&gt;&lt;br&gt;/*****************************************************************************/
&lt;br&gt;&lt;br&gt;#define DBNAME &amp;quot;music&amp;quot;
&lt;br&gt;#define DBTYPE &amp;quot;application/x-fivedb&amp;quot;
&lt;br&gt;#define SERVERURL &amp;quot;&lt;a href=&quot;http://10.1.0.175:5545/sync&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://10.1.0.175:5545/sync&lt;/a&gt;&amp;quot;
&lt;br&gt;&lt;br&gt;/* Hehe, lame. &amp;nbsp;Just for this test... */
&lt;br&gt;static SmlTransport *tsp = NULL;
&lt;br&gt;static SmlManager *mgr = NULL;
&lt;br&gt;static SmlDevInfAgent *agent = NULL;
&lt;br&gt;static SmlDsServer *dscli = NULL;
&lt;br&gt;static SmlSession *first = NULL;
&lt;br&gt;static SmlDsSession *firstds = NULL;
&lt;br&gt;&lt;br&gt;static GList *sessions = NULL;
&lt;br&gt;&lt;br&gt;/*****************************************************************************/
&lt;br&gt;&lt;br&gt;static void ds_client_get_changeinfo(void);
&lt;br&gt;static SmlBool _ds_client_recv_alert(SmlDsSession *dsess, SmlAlertType type,
&lt;br&gt;&amp;nbsp; const char *last, const char *next, gpointer udata);
&lt;br&gt;static void _ds_alert(SmlDsSession *dsess, gpointer udata);
&lt;br&gt;&lt;br&gt;static void _recv_alert_reply(SmlSession *sess, SmlStatus *status, void *udata)
&lt;br&gt;{
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; unsigned int code = smlStatusGetCode(status);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; printf(&amp;quot;_recv_alert_reply(status=%u)\n&amp;quot;, code);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; smlDsSessionDispatch(firstds);
&lt;br&gt;}
&lt;br&gt;&lt;br&gt;static SmlBool _ds_client_recv_alert(SmlDsSession *dsess, SmlAlertType type,
&lt;br&gt;&amp;nbsp; const char *last, const char *next, gpointer udata)
&lt;br&gt;{
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; printf(&amp;quot;I BELIEVE WE NEED TO DO SOMETHING, BUT WHAT!?\n&amp;quot;);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return TRUE;
&lt;br&gt;}
&lt;br&gt;&lt;br&gt;static void _recv_sync_reply(SmlSession *sess, SmlStatus *status, void *udata)
&lt;br&gt;{
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; unsigned int code = smlStatusGetCode(status);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; printf(&amp;quot;_recv_sync_reply(status=%u)\n&amp;quot;, code);
&lt;br&gt;}
&lt;br&gt;&lt;br&gt;static void _ds_event(SmlDsSession *dsess, SmlDsEvent ev, void *udata)
&lt;br&gt;{
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; printf(&amp;quot;_ds_event: ?\n&amp;quot;);
&lt;br&gt;}
&lt;br&gt;&lt;br&gt;static void _recv_sync(SmlDsSession *dsess, unsigned int nchanges, void *udata)
&lt;br&gt;{
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; printf(&amp;quot;_recv_sync(nchanges=%u)\n&amp;quot;, nchanges);
&lt;br&gt;}
&lt;br&gt;&lt;br&gt;static SmlBool _recv_change(SmlDsSession *dsess, SmlChangeType type,
&lt;br&gt;&amp;nbsp; const char *uid, char *data, unsigned int size, const char *contenttype,
&lt;br&gt;&amp;nbsp; void *udata, SmlError **err)
&lt;br&gt;{
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; printf(&amp;quot;_recv_change(type=%d, uid=%s, mime=%s)\n&amp;quot;, (int)type,
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; uid, contenttype);
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return TRUE;
&lt;br&gt;}
&lt;br&gt;&lt;br&gt;static void ds_client_get_changeinfo(void)
&lt;br&gt;{
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; SmlError *err = NULL;
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; printf(&amp;quot;ds_client_get_changeinfo()\n&amp;quot;);
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; smlDsSessionGetEvent(firstds, _ds_event, NULL);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; smlDsSessionGetSync(firstds, _recv_sync, NULL);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; smlDsSessionGetChanges(firstds, _recv_change, NULL);
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (smlDsSessionSendSync(firstds, 0, _recv_sync_reply, NULL, &amp;err) == FALSE)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; abort();
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (smlDsSessionCloseSync(firstds, &amp;err) == FALSE)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; abort();
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; smlSessionFlush(first, TRUE, NULL);
&lt;br&gt;}
&lt;br&gt;&lt;br&gt;static void ds_client_init_sync_mode(void)
&lt;br&gt;{
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; SmlError *err = NULL;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; char *last = NULL;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; char next[17];
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; time_t htime;
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; printf(&amp;quot;ds_client_init_sync_mode()\n&amp;quot;);
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; htime = time(NULL);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; strftime(next, sizeof(next), &amp;quot;%s&amp;quot;, gmtime(&amp;htime));
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; assert(firstds == NULL);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; firstds = smlDsServerSendAlert(dscli, first, SML_ALERT_ONE_WAY_FROM_SERVER,
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; last, next, _recv_alert_reply, NULL, &amp;err);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; assert(firstds != NULL);
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; _ds_alert(firstds, NULL);
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; smlDsSessionGetAlert(firstds, _ds_client_recv_alert, NULL);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; smlSessionFlush(first, TRUE, NULL);
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ds_client_get_changeinfo();
&lt;br&gt;}
&lt;br&gt;&lt;br&gt;static void _manager_event(SmlManager *mgr, SmlManagerEventType type,
&lt;br&gt;&amp;nbsp; SmlSession *sess, SmlError *assocerr, gpointer udata)
&lt;br&gt;{
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; SmlError *err = NULL;
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; g_warning(&amp;quot;_manager_event: TODO&amp;quot;);
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; switch (type)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; case SML_MANAGER_SESSION_FLUSH:
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; printf(&amp;quot;SML_MANAGER_SESSION_FLUSH\n&amp;quot;);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; break;
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; /* To get here, we just set up the basic connection mechanics, now we
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;* must initiate the SyncML session and start the event queue engine
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;* moving. */
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; case SML_MANAGER_CONNECT_DONE:
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; printf(&amp;quot;SML_MANAGER_CONNECT_DONE\n&amp;quot;);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ds_client_init_sync_mode();
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; break;
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; case SML_MANAGER_DISCONNECT_DONE:
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; printf(&amp;quot;SML_MANAGER_DISCONNECT_DONE\n&amp;quot;);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; break;
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; case SML_MANAGER_TRANSPORT_ERROR:
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; printf(&amp;quot;SML_MANAGER_TRANSPORT_ERROR: %s\n&amp;quot;,
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; smlErrorPrint(&amp;assocerr));
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; smlTransportDisconnect(tsp, NULL, NULL);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; break;
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; case SML_MANAGER_SESSION_NEW:
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; printf(&amp;quot;SML_MANAGER_SESSION_NEW\n&amp;quot;);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; smlSessionUseStringTable(sess, TRUE);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; smlSessionUseNumberOfChanges(sess, TRUE);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; smlSessionSetReceivingMaxMsgSize(sess, 4096);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; smlSessionUseLargeObjects(sess, TRUE);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; smlSessionRef(sess);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; break;
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; case SML_MANAGER_SESSION_FINAL:
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; printf(&amp;quot;SML_MANAGER_SESSION_FINAL\n&amp;quot;);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (smlSessionFlush(sess, TRUE, &amp;err) == FALSE)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; g_warning(&amp;quot;smlSessionFlush failed: %s\n&amp;quot;,
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; smlErrorPrint(&amp;err));
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; smlErrorDeref(&amp;err);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; break;
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; case SML_MANAGER_SESSION_END:
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; printf(&amp;quot;SML_MANAGER_SESSION_END\n&amp;quot;);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; smlTransportDisconnect(tsp, NULL, NULL);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; break;
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; case SML_MANAGER_SESSION_ERROR:
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; printf(&amp;quot;SML_MANAGER_SESSION_ERROR: %s, %s\n&amp;quot;,
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sess ? smlSessionGetSessionID(sess) : &amp;quot;(null)&amp;quot;, 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; smlErrorPrint(&amp;assocerr));
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; break;
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; case SML_MANAGER_SESSION_WARNING:
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; printf(&amp;quot;SML_MANAGER_SESSION_WARNING: %s\n&amp;quot;,
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; smlErrorPrint(&amp;assocerr));
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; break;
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; default:
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; abort();
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; break;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;}
&lt;br&gt;&lt;br&gt;static void _ds_alert(SmlDsSession *dsess, gpointer udata)
&lt;br&gt;{
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; g_message(&amp;quot;Got here, I think we did the right thing...\n&amp;quot;);
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; smlDsSessionRef(dsess);
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sessions = g_list_append(sessions, dsess);
&lt;br&gt;}
&lt;br&gt;&lt;br&gt;static gboolean client_init(void)
&lt;br&gt;{
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; SmlDevInf *devinf;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; SmlLocation *loc = NULL;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; SmlTransportHttpClientConfig cfg;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; SmlAuthenticator *auth;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; SmlError *err = NULL;
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; tsp = smlTransportNew(SML_TRANSPORT_HTTP_CLIENT, &amp;err);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; assert(tsp != NULL);
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; mgr = smlManagerNew(tsp, &amp;err);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; assert(mgr != NULL);
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; smlManagerSetEventCallback(mgr, _manager_event, NULL);
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; /* AUTH */
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; auth = smlAuthNew(&amp;err);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; assert(auth != NULL);
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; smlAuthSetEnable(auth, FALSE);
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (smlAuthRegister(auth, mgr, &amp;err) == FALSE)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; abort();
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; /* DEVINF */
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; devinf = smlDevInfNew(&amp;quot;syncml-client&amp;quot;, SML_DEVINF_DEVTYPE_WORKSTATION, &amp;err);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; assert(devinf != NULL);
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; smlDevInfSetSoftwareVersion(devinf, &amp;quot;0.0.1&amp;quot;);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; smlDevInfSetSupportsNumberOfChanges(devinf, TRUE);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; smlDevInfSetSupportsLargeObjs(devinf, TRUE);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; smlDevInfSetSupportsUTC(devinf, TRUE);
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; agent = smlDevInfAgentNew(devinf, &amp;err);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; assert(agent != NULL);
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (smlDevInfAgentRegister(agent, mgr, &amp;err) == FALSE)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return FALSE;
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; /* DATABASE */
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; loc = smlLocationNew(DBNAME, NULL, &amp;err);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; assert(loc != NULL);
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dscli = smlDsClientNew(DBTYPE, loc, loc, &amp;err);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; assert(dscli != NULL);
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (smlDsServerRegister(dscli, mgr, &amp;err) == FALSE)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; abort();
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; smlDsServerSetConnectCallback(dscli, _ds_alert, NULL);
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; /* GO! */
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (smlManagerStart(mgr, &amp;err) == FALSE)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; abort();
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; memset(&amp;cfg, 0, sizeof(cfg));
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; cfg.url = SERVERURL;
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (smlTransportInitialize(tsp, &amp;cfg, &amp;err) == FALSE)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; abort();
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return TRUE;
&lt;br&gt;}
&lt;br&gt;&lt;br&gt;static gboolean _sessions_prepare(GSource *src, gint *timeout)
&lt;br&gt;{
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; *timeout = 50;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return FALSE;
&lt;br&gt;}
&lt;br&gt;&lt;br&gt;static gboolean _sessions_check(GSource *src)
&lt;br&gt;{
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; GList *s;
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; for (s = sessions; s != NULL; s = s-&amp;gt;next)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (smlDsSessionCheck(s-&amp;gt;data) == TRUE)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return TRUE;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (smlManagerCheck(mgr) == TRUE)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return TRUE;
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return FALSE;
&lt;br&gt;}
&lt;br&gt;&lt;br&gt;static gboolean _sessions_dispatch(GSource *src, GSourceFunc cb, gpointer udata)
&lt;br&gt;{
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; GList *s;
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; printf(&amp;quot;_sessions_dispatch()\n&amp;quot;);
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; for (s = sessions; s != NULL; s = s-&amp;gt;next)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; printf(&amp;quot;smlDsSessionDispathch(%p)\n&amp;quot;, s-&amp;gt;data);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; smlDsSessionDispatch(s-&amp;gt;data);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; smlManagerDispatch(mgr);
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return TRUE;
&lt;br&gt;}
&lt;br&gt;&lt;br&gt;static void client_attach(void)
&lt;br&gt;{
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; GSourceFuncs *funcs = g_malloc0(sizeof(GSourceFuncs));
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; funcs-&amp;gt;prepare = _sessions_prepare;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; funcs-&amp;gt;check = _sessions_check;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; funcs-&amp;gt;dispatch = _sessions_dispatch;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; funcs-&amp;gt;finalize = NULL;
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; GSource *src = g_source_new(funcs, sizeof(GSource));
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; g_source_set_callback(src, NULL, NULL, NULL);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; g_source_attach(src, NULL);
&lt;br&gt;}
&lt;br&gt;&lt;br&gt;char *generate_session_id(void)
&lt;br&gt;{
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; char *buf;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; guint32 r;
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; buf = malloc(17);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; assert(buf != NULL);
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; /* Pack the randomness into a buffer for encoding. */
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; r = g_random_int();
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sprintf(buf, &amp;quot;%08&amp;quot; PRIx32, (uint32_t)r);
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; r = g_random_int();
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sprintf(buf + 8, &amp;quot;%08&amp;quot; PRIx32, (uint32_t)r);
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return buf;
&lt;br&gt;}
&lt;br&gt;&lt;br&gt;static char *client_connect(void)
&lt;br&gt;{
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; SmlError *err = NULL;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; char *sessId;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; SmlLocation *target;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; SmlLocation *source;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; SmlLink *link;
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sessId = generate_session_id();
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; printf(&amp;quot;Initializing session %s\n&amp;quot;, sessId);
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; target = smlLocationNew(DBNAME, NULL, &amp;err);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; assert(target != NULL);
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; source = smlLocationNew(DBNAME, NULL, &amp;err);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; assert(source != NULL);
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; link = smlLinkNew(tsp, NULL, &amp;err);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; assert(link != NULL);
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; assert(first == NULL);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; first = smlSessionNew(SML_SESSION_TYPE_CLIENT, SML_MIMETYPE_WBXML,
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; SML_VERSION_11, SML_PROTOCOL_SYNCML, target, source, sessId, 0, &amp;err);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; assert(first != NULL);
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; /* We'll need to manage this ref. */
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; smlSessionRef(first);
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (smlManagerSessionAdd(mgr, first, link, &amp;err) == FALSE)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; abort();
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (smlDevInfAgentRegisterSession(agent, mgr, first, &amp;err) == FALSE)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; abort();
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (smlDevInfAgentSendDevInf(agent, first, &amp;err) == FALSE)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; abort();
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (smlDevInfAgentRequestDevInf(agent, first, &amp;err) == FALSE)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; abort();
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (smlSessionFlush(first, TRUE, &amp;err) == FALSE)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; abort();
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return sessId;
&lt;br&gt;}
&lt;br&gt;&lt;br&gt;static void client_finish(void)
&lt;br&gt;{
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; smlSessionUnref(first);
&lt;br&gt;}
&lt;br&gt;&lt;br&gt;/*****************************************************************************/
&lt;br&gt;&lt;br&gt;int main(int argc, char **argv)
&lt;br&gt;{
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; GMainLoop *loop;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; char *sessId;
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; g_type_init();
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; client_init();
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; client_attach();
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sessId = client_connect();
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; printf(&amp;quot;sessId=%s\n&amp;quot;, sessId);
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; g_free(sessId);
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; g_message(&amp;quot;Let's roll!&amp;quot;);
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; loop = g_main_loop_new(NULL, FALSE);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; assert(loop != NULL);
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; g_main_loop_run(loop);
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; client_finish();
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return EXIT_SUCCESS;
&lt;br&gt;}
&lt;br&gt;&lt;br /&gt;-------------------------------------------------------------------------
&lt;br&gt;Check out the new SourceForge.net Marketplace.
&lt;br&gt;It's the best place to buy or sell services for
&lt;br&gt;just about anything Open Source.
&lt;br&gt;&lt;a href=&quot;http://sourceforge.net/services/buy/index.php&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://sourceforge.net/services/buy/index.php&lt;/a&gt;&lt;br /&gt;_______________________________________________
&lt;br&gt;Opensync-devel mailing list
&lt;br&gt;&lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=18077411&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Opensync-devel@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://lists.sourceforge.net/lists/listinfo/opensync-devel&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://lists.sourceforge.net/lists/listinfo/opensync-devel&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/libsyncml-HTTP-client-support--tp17614492p18077411.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-18074937</id>
	<title>Re: osync_xmlformat_validate() in format plugins</title>
	<published>2008-06-23T11:10:56Z</published>
	<updated>2008-06-23T11:10:56Z</updated>
	<author>
		<name>Bjoern Ricks</name>
	</author>
	<content type="html">&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; On Thursday 19 June 2008 16:18:02 Bjoern Ricks wrote:
&lt;br&gt;&amp;gt; &amp;nbsp; 
&lt;br&gt;&amp;gt;&amp;gt; I started coding to get rid of osync_xml_validate and to have only one
&lt;br&gt;&amp;gt;&amp;gt; instance of a xml schema for each objtype. Therefore I tried to reuse
&lt;br&gt;&amp;gt;&amp;gt; the oop singleton pattern in C via a static GList. Could you please
&lt;br&gt;&amp;gt;&amp;gt; review my first intuition because I am more familiar with C++ than C.
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Thanks for looking into this!
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; The idea of using C++-singleton-like sounds interesting. I wonder if we would 
&lt;br&gt;&amp;gt; change some more stuff, if this would be still required. For example make all 
&lt;br&gt;&amp;gt; OSyncXMLFormat &amp;quot;inherit&amp;quot; of OSyncXMLFormatSchema? We just force/require for 
&lt;br&gt;&amp;gt; all XMLFormats a schema file, by changing osync_xmlformat_new parameter list 
&lt;br&gt;&amp;gt; to:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; osync_xmlformat_new(const char *objtype, OSyncXMLFormatSchema *schema, 
&lt;br&gt;&amp;gt; OSyncError **error);
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; And putting an OSyncXMLFormatSchema pointer into the internal struct.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Thoughts?
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; [...]
&lt;br&gt;&amp;gt; &amp;nbsp; 
&lt;/div&gt;That could be a better solution than to use static variables for each 
&lt;br&gt;objtype. I was thinking about that too. But I didn't dare to change the 
&lt;br&gt;parameter list.
&lt;br&gt;But the new solution has another problem. Where should the 
&lt;br&gt;OSyncXMLFormatSchemas be created (and released)? We need only one 
&lt;br&gt;instance per objtype. Is there one osnyc engine per application? Then 
&lt;br&gt;the engine could be the right part to create OSyncXMLFormatSchemas.
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; 
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp;/**
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; * @brief Validate the xmlformat against its schema in inidivual path
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; * @param xmlformat The pointer to a xmlformat object
&lt;br&gt;&amp;gt;&amp;gt; @@ -399,8 +473,9 @@
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp;osync_bool osync_xmlformat_validate(OSyncXMLFormat *xmlformat)
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp;{
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; osync_assert(xmlformat);
&lt;br&gt;&amp;gt;&amp;gt; -
&lt;br&gt;&amp;gt;&amp;gt; - &amp;nbsp; &amp;nbsp; &amp;nbsp; return _osync_xmlformat_validate(xmlformat, NULL);
&lt;br&gt;&amp;gt;&amp;gt; +
&lt;br&gt;&amp;gt;&amp;gt; + &amp;nbsp; &amp;nbsp; &amp;nbsp; OSyncXMLFormatSchema * schema =
&lt;br&gt;&amp;gt;&amp;gt; osync_xmlformat_schema_get_instance(xmlformat, NULL); + &amp;nbsp; &amp;nbsp; &amp;nbsp; return
&lt;br&gt;&amp;gt;&amp;gt; osync_xmlformat_schema_validate(schema, xmlformat);
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; We should avoid code which is ignoring the error handling by passing NULL 
&lt;br&gt;&amp;gt; instead of a OSyncError reference. (I know there is/was some code doing 
&lt;br&gt;&amp;gt; so ... but we should get rid of those old code. It's just bad/wrong/....). 
&lt;br&gt;&amp;gt; Feel free to change the paramter list vor the _validate() function to 
&lt;br&gt;&amp;gt; (OSyncXMLFormat *xmlformat, OSyncError **error). You might set also an error 
&lt;br&gt;&amp;gt; when osync_xmlformat_schema_validate is false:
&lt;br&gt;&amp;gt; osync_error_set(*error, OSYNC_ERROR_GENERIC /*or something different */, &amp;quot;XML 
&lt;br&gt;&amp;gt; Format validation failed.&amp;quot;);
&lt;br&gt;&amp;gt; &amp;nbsp; 
&lt;/div&gt;:-) I was irritated because osync_xmlformat_validate had no error 
&lt;br&gt;parameter. Therefore I had to use a NULL value. So we should change the 
&lt;br&gt;function signature.
&lt;br&gt;-- 
&lt;br&gt;------------------------------------------------------------------------
&lt;br&gt;University of Applied Sciences Osnabrueck
&lt;br&gt;Faculty of Engineering and Computer Science
&lt;br&gt;Dipl.-Inf. (FH) Bjoern Ricks
&lt;br&gt;&lt;br&gt;P.O. Box 1940 - 49009 Osnabrueck - Germany
&lt;br&gt;Phone: +49 541/969-3452 Fax: +49 541/969-13452
&lt;br&gt;Email: &lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=18074937&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;b.ricks@...&lt;/a&gt; &amp;lt;mailto:&lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=18074937&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;b.ricks@...&lt;/a&gt;&amp;gt;
&lt;br&gt;Web: &lt;a href=&quot;http://www.ecs.fh-osnabrueck.de/ricks.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.ecs.fh-osnabrueck.de/ricks.html&lt;/a&gt;&lt;br&gt;&lt;br&gt;-------------------------------------------------------------------------
&lt;br&gt;Check out the new SourceForge.net Marketplace.
&lt;br&gt;It's the best place to buy or sell services for
&lt;br&gt;just about anything Open Source.
&lt;br&gt;&lt;a href=&quot;http://sourceforge.net/services/buy/index.php&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://sourceforge.net/services/buy/index.php&lt;/a&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;Opensync-devel mailing list
&lt;br&gt;&lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=18074937&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Opensync-devel@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://lists.sourceforge.net/lists/listinfo/opensync-devel&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://lists.sourceforge.net/lists/listinfo/opensync-devel&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/osync_xmlformat_validate%28%29-in-format-plugins-tp17036168p18074937.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-18070357</id>
	<title>Re: osync_xmlformat_validate() in format plugins</title>
	<published>2008-06-23T07:25:22Z</published>
	<updated>2008-06-23T07:25:22Z</updated>
	<author>
		<name>Daniel Gollub</name>
	</author>
	<content type="html">On Thursday 19 June 2008 16:18:02 Bjoern Ricks wrote:
&lt;br&gt;&amp;gt; I started coding to get rid of osync_xml_validate and to have only one
&lt;br&gt;&amp;gt; instance of a xml schema for each objtype. Therefore I tried to reuse
&lt;br&gt;&amp;gt; the oop singleton pattern in C via a static GList. Could you please
&lt;br&gt;&amp;gt; review my first intuition because I am more familiar with C++ than C.
&lt;br&gt;&lt;br&gt;Thanks for looking into this!
&lt;br&gt;&lt;br&gt;The idea of using C++-singleton-like sounds interesting. I wonder if we would 
&lt;br&gt;change some more stuff, if this would be still required. For example make all 
&lt;br&gt;OSyncXMLFormat &amp;quot;inherit&amp;quot; of OSyncXMLFormatSchema? We just force/require for 
&lt;br&gt;all XMLFormats a schema file, by changing osync_xmlformat_new parameter list 
&lt;br&gt;to:
&lt;br&gt;&lt;br&gt;osync_xmlformat_new(const char *objtype, OSyncXMLFormatSchema *schema, 
&lt;br&gt;OSyncError **error);
&lt;br&gt;&lt;br&gt;And putting an OSyncXMLFormatSchema pointer into the internal struct.
&lt;br&gt;&lt;br&gt;Thoughts?
&lt;br&gt;&lt;br&gt;[...]
&lt;br&gt;&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; &amp;nbsp;/**
&lt;br&gt;&amp;gt; &amp;nbsp; * @brief Validate the xmlformat against its schema in inidivual path
&lt;br&gt;&amp;gt; &amp;nbsp; * @param xmlformat The pointer to a xmlformat object
&lt;br&gt;&amp;gt; @@ -399,8 +473,9 @@
&lt;br&gt;&amp;gt; &amp;nbsp;osync_bool osync_xmlformat_validate(OSyncXMLFormat *xmlformat)
&lt;br&gt;&amp;gt; &amp;nbsp;{
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; osync_assert(xmlformat);
&lt;br&gt;&amp;gt; -
&lt;br&gt;&amp;gt; - &amp;nbsp; &amp;nbsp; &amp;nbsp; return _osync_xmlformat_validate(xmlformat, NULL);
&lt;br&gt;&amp;gt; +
&lt;br&gt;&amp;gt; + &amp;nbsp; &amp;nbsp; &amp;nbsp; OSyncXMLFormatSchema * schema =
&lt;br&gt;&amp;gt; osync_xmlformat_schema_get_instance(xmlformat, NULL); + &amp;nbsp; &amp;nbsp; &amp;nbsp; return
&lt;br&gt;&amp;gt; osync_xmlformat_schema_validate(schema, xmlformat);
&lt;/div&gt;&lt;br&gt;We should avoid code which is ignoring the error handling by passing NULL 
&lt;br&gt;instead of a OSyncError reference. (I know there is/was some code doing 
&lt;br&gt;so ... but we should get rid of those old code. It's just bad/wrong/....). 
&lt;br&gt;Feel free to change the paramter list vor the _validate() function to 
&lt;br&gt;(OSyncXMLFormat *xmlformat, OSyncError **error). You might set also an error 
&lt;br&gt;when osync_xmlformat_schema_validate is false:
&lt;br&gt;osync_error_set(*error, OSYNC_ERROR_GENERIC /*or something different */, &amp;quot;XML 
&lt;br&gt;Format validation failed.&amp;quot;);
&lt;br&gt;&lt;br&gt;-------------------------------------------------------------------------
&lt;br&gt;Check out the new SourceForge.net Marketplace.
&lt;br&gt;It's the best place to buy or sell services for
&lt;br&gt;just about anything Open Source.
&lt;br&gt;&lt;a href=&quot;http://sourceforge.net/services/buy/index.php&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://sourceforge.net/services/buy/index.php&lt;/a&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;Opensync-devel mailing list
&lt;br&gt;&lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=18070357&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Opensync-devel@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://lists.sourceforge.net/lists/listinfo/opensync-devel&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://lists.sourceforge.net/lists/listinfo/opensync-devel&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/osync_xmlformat_validate%28%29-in-format-plugins-tp17036168p18070357.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-18069306</id>
	<title>Re: libsyncml HTTP client support?</title>
	<published>2008-06-23T06:26:45Z</published>
	<updated>2008-06-23T06:26:45Z</updated>
	<author>
		<name>Michael Bell</name>
	</author>
	<content type="html">Josh Guilfoyle wrote:
&lt;br&gt;&amp;gt; I've been looking into this more and ran into a problem that is not 
&lt;br&gt;&amp;gt; apparent from the opensync plugin. &amp;nbsp;I have attached code I extracted in 
&lt;br&gt;&amp;gt; order to form a very simple functional test of libsyncml operating as a 
&lt;br&gt;&amp;gt; client to my server, also using libsyncml. &amp;nbsp;You should be able to 
&lt;br&gt;&amp;gt; trivially modify it to connect to your own local test server and I 
&lt;br&gt;&amp;gt; expect you will see the same results.
&lt;br&gt;&lt;br&gt;I think the attachment is missing ;)
&lt;br&gt;&lt;br&gt;Before I start a short warning: I do not develop the code. I only 
&lt;br&gt;interpret it. So I'm sorry if I'm not fully correct and I hope some more 
&lt;br&gt;longstanding developers of OpenSync read and check this reply too.
&lt;br&gt;&lt;br&gt;&amp;gt; What is happening is that the client is connecting, sending the &amp;lt;Alert&amp;gt;, 
&lt;br&gt;&amp;gt; which is responded to by the server, which also sends its anticipated 
&lt;br&gt;&amp;gt; &amp;lt;Alert&amp;gt;. &amp;nbsp;However, _ds_client_recv_alert is not triggered. &amp;nbsp;Analyzing 
&lt;br&gt;&amp;gt; the log file, I see that smlDsSessionRecvAlert *is* called, but no 
&lt;br&gt;&amp;gt; corresponding smlDsSessionDispatch to get the callback and response 
&lt;br&gt;&amp;gt; processed. &amp;nbsp;Similarly, _ds_alert (from smlDsServerSetConnectCallback) is 
&lt;br&gt;&amp;gt; never triggered, which could be the reason why smlDsSessionDispatch 
&lt;br&gt;&amp;gt; didn't occur as expected.
&lt;br&gt;&lt;br&gt;smlDsSessionRecvAlert is only used to signal the received alert. This 
&lt;br&gt;function is usually registered at the manager and called by the manager. 
&lt;br&gt;This function mainly build the response.
&lt;br&gt;&lt;br&gt;smlDsSessionDispatch is the real dispatcher. libsyncml uses glib's 
&lt;br&gt;mechanisms for event management here. It creates a GSource and registers 
&lt;br&gt;it together with some functions at a context. glib loops on the context 
&lt;br&gt;and calls the dispatch function from time to time.
&lt;br&gt;&lt;br&gt;If you don't want to implement it this way then you can write some kind 
&lt;br&gt;of while or for loop which call smlDsSessionDispatch.
&lt;br&gt;&lt;br&gt;@Daniel: I hope the explanation is correct. I'm not a glib expert. I 
&lt;br&gt;only read and interpret the syncml plugin code.
&lt;br&gt;&lt;br&gt;Best regards
&lt;br&gt;&lt;br&gt;Michael
&lt;br&gt;-- 
&lt;br&gt;_______________________________________________________________
&lt;br&gt;&lt;br&gt;Michael Bell &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Humboldt-Universitaet zu Berlin
&lt;br&gt;&lt;br&gt;Tel.: +49 (0)30-2093 2482 &amp;nbsp; &amp;nbsp; &amp;nbsp; ZE Computer- und Medienservice
&lt;br&gt;Fax: &amp;nbsp;+49 (0)30-2093 2704 &amp;nbsp; &amp;nbsp; &amp;nbsp; Unter den Linden 6
&lt;br&gt;&lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=18069306&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;michael.bell@...&lt;/a&gt; &amp;nbsp; D-10099 Berlin
&lt;br&gt;_______________________________________________________________
&lt;br&gt;&lt;br&gt;X.509 CA Certificates / Wurzelzertifikate
&lt;br&gt;&lt;br&gt;&lt;a href=&quot;https://pki.pca.dfn.de/hu-berlin-ca/cgi-bin/pub/pki?cmd=getStaticPage;name=index;id=2&amp;RA_ID=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://pki.pca.dfn.de/hu-berlin-ca/cgi-bin/pub/pki?cmd=getStaticPage;name=index;id=2&amp;RA_ID=0&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;br /&gt; &lt;br /&gt;-------------------------------------------------------------------------
&lt;br&gt;Check out the new SourceForge.net Marketplace.
&lt;br&gt;It's the best place to buy or sell services for
&lt;br&gt;just about anything Open Source.
&lt;br&gt;&lt;a href=&quot;http://sourceforge.net/services/buy/index.php&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://sourceforge.net/services/buy/index.php&lt;/a&gt;&lt;br /&gt;_______________________________________________
&lt;br&gt;Opensync-devel mailing list
&lt;br&gt;&lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=18069306&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Opensync-devel@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://lists.sourceforge.net/lists/listinfo/opensync-devel&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://lists.sourceforge.net/lists/listinfo/opensync-devel&lt;/a&gt;&lt;br&gt;&lt;div class=&quot;small&quot;&gt;&lt;br/&gt;&lt;img src=&quot;http://www.nabble.com/images/icon_attachment.gif&quot; &gt; &lt;strong&gt;smime.p7s&lt;/strong&gt; (7K) &lt;a href=&quot;http://www.nabble.com/attachment/18069306/0/smime.p7s&quot; target=&quot;_top&quot;&gt;Download Attachment&lt;/a&gt;&lt;/div&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/libsyncml-HTTP-client-support--tp17614492p18069306.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-18063455</id>
	<title>Re: Plugin Building</title>
	<published>2008-06-22T23:44:52Z</published>
	<updated>2008-06-22T23:44:52Z</updated>
	<author>
		<name>Bjoern Ricks</name>
	</author>
	<content type="html">Hi Alexander,
&lt;br&gt;&lt;br&gt;we introduced a cmake makro that forbids to build within the source 
&lt;br&gt;dirs. Please create a separate directory like &amp;quot;build&amp;quot; and use it 
&lt;br&gt;instead. With a separate build dir it is easier to remove all files that 
&lt;br&gt;a generated by cmake (like the Makefiles or the CMakeFiles sub dirs). It 
&lt;br&gt;is possible to use only rm -r * in your build dir to clean up all cmake 
&lt;br&gt;files. Without a separate build dir you have to remove all cmake files 
&lt;br&gt;within the source directories.
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Hi,
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; when running cmake on the kde-pim or google-calendar plugins from svn cmake
&lt;br&gt;&amp;gt; throws an error, telling me that the build dir has to be different from the
&lt;br&gt;&amp;gt; src dir.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Is there still a reason for that or is that just a legacy?
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; It would be nice to get rid of that because without that I can create
&lt;br&gt;&amp;gt; eclipse CDT projects easier with cmake.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Alexander
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; 
&lt;/div&gt;-- 
&lt;br&gt;/Bjoern Ricks
&lt;br&gt;&lt;br&gt;-------------------------------------------------------------------------
&lt;br&gt;Check out the new SourceForge.net Marketplace.
&lt;br&gt;It's the best place to buy or sell services for
&lt;br&gt;just about anything Open Source.
&lt;br&gt;&lt;a href=&quot;http://sourceforge.net/services/buy/index.php&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://sourceforge.net/services/buy/index.php&lt;/a&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;Opensync-devel mailing list
&lt;br&gt;&lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=18063455&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Opensync-devel@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://lists.sourceforge.net/lists/listinfo/opensync-devel&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://lists.sourceforge.net/lists/listinfo/opensync-devel&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/Plugin-Building-tp18054143p18063455.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-18054143</id>
	<title>Plugin Building</title>
	<published>2008-06-22T05:32:59Z</published>
	<updated>2008-06-22T05:32:59Z</updated>
	<author>
		<name>Alexander Egger</name>
	</author>
	<content type="html">Hi,
&lt;br&gt;&lt;br&gt;when running cmake on the kde-pim or google-calendar plugins from svn cmake
&lt;br&gt;throws an error, telling me that the build dir has to be different from the
&lt;br&gt;src dir.
&lt;br&gt;&lt;br&gt;Is there still a reason for that or is that just a legacy?
&lt;br&gt;&lt;br&gt;It would be nice to get rid of that because without that I can create
&lt;br&gt;eclipse CDT projects easier with cmake.
&lt;br&gt;&lt;br&gt;Alexander
&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;Dr. Alexander Egger, Studiengang IT &amp; IT-Marketing
&lt;br&gt;CAMPUS 02 Fachhochschule der Wirtschaft GmbH
&lt;br&gt;Körblergasse 126, 8021 Graz, Austria/EUROPE
&lt;br&gt;T:+43 316 6002 395 M:+43 699 14102026
&lt;br&gt;&lt;br&gt;----------------------
&lt;br&gt;GTDInbox.com: [P/Privat/opensync]
&lt;br&gt;&lt;br&gt;-------------------------------------------------------------------------
&lt;br&gt;Check out the new SourceForge.net Marketplace.
&lt;br&gt;It's the best place to buy or sell services for
&lt;br&gt;just about anything Open Source.
&lt;br&gt;&lt;a href=&quot;http://sourceforge.net/services/buy/index.php&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://sourceforge.net/services/buy/index.php&lt;/a&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;Opensync-devel mailing list
&lt;br&gt;&lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=18054143&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Opensync-devel@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://lists.sourceforge.net/lists/listinfo/opensync-devel&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://lists.sourceforge.net/lists/listinfo/opensync-devel&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/Plugin-Building-tp18054143p18054143.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-18041699</id>
	<title>Re: libsyncml HTTP client support?</title>
	<published>2008-06-20T15:17:34Z</published>
	<updated>2008-06-20T15:17:34Z</updated>
	<author>
		<name>jasta</name>
	</author>
	<content type="html">I've been looking into this more and ran into a problem that is not 
&lt;br&gt;apparent from the opensync plugin. &amp;nbsp;I have attached code I extracted in 
&lt;br&gt;order to form a very simple functional test of libsyncml operating as a 
&lt;br&gt;client to my server, also using libsyncml. &amp;nbsp;You should be able to 
&lt;br&gt;trivially modify it to connect to your own local test server and I 
&lt;br&gt;expect you will see the same results.
&lt;br&gt;&lt;br&gt;What is happening is that the client is connecting, sending the &amp;lt;Alert&amp;gt;, 
&lt;br&gt;which is responded to by the server, which also sends its anticipated 
&lt;br&gt;&amp;lt;Alert&amp;gt;. &amp;nbsp;However, _ds_client_recv_alert is not triggered. &amp;nbsp;Analyzing 
&lt;br&gt;the log file, I see that smlDsSessionRecvAlert *is* called, but no 
&lt;br&gt;corresponding smlDsSessionDispatch to get the callback and response 
&lt;br&gt;processed. &amp;nbsp;Similarly, _ds_alert (from smlDsServerSetConnectCallback) is 
&lt;br&gt;never triggered, which could be the reason why smlDsSessionDispatch 
&lt;br&gt;didn't occur as expected.
&lt;br&gt;&lt;br&gt;P.S. I am using libsyncml-0.4.6 in my tests.
&lt;br&gt;&lt;br&gt;Michael Bell wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Hi Josh,
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; I'm back with a working notebook and I remember that you have at minimum 
&lt;br&gt;&amp;gt; one open issue issue with moreData (actually I search for the according 
&lt;br&gt;&amp;gt; mails).
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Josh Guilfoyle wrote:
&lt;br&gt;&amp;gt;&amp;gt; Is libsyncml (either in SVN or 0.4.6) expected to function correctly 
&lt;br&gt;&amp;gt;&amp;gt; as an HTTP client to a SyncML server, also implemented using 
&lt;br&gt;&amp;gt;&amp;gt; libsyncml? &amp;nbsp;I can't seem to make this work based on the 
&lt;br&gt;&amp;gt;&amp;gt; syncml-http-client example, and furthermore, I can't see that the API 
&lt;br&gt;&amp;gt;&amp;gt; even exposes enough to make this work. &amp;nbsp;For example, how would you 
&lt;br&gt;&amp;gt;&amp;gt; specify the sync anchors? &amp;nbsp;And why does it always seem to hardcode the 
&lt;br&gt;&amp;gt;&amp;gt; session id of 1 instead of using some crytographically secure random 
&lt;br&gt;&amp;gt;&amp;gt; number?
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 1. syncml-http-client
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; I don't know who coded the http client in libsyncml/tools but after I 
&lt;br&gt;&amp;gt; tried to fix it for a while I give it up. It is completely broken and I 
&lt;br&gt;&amp;gt; think it never worked.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 2. Example code
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; If you want to see an example use of the http client stuff then please 
&lt;br&gt;&amp;gt; look into the syncml plugin of OpenSync. This is tested with OCS. It is 
&lt;br&gt;&amp;gt; some kind of special because OpenSync acts as a master and so it needs 
&lt;br&gt;&amp;gt; two sessions.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 3. According sync anchors:
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Please see function ds_client_init_sync_mode in file syncml_ds_client.c 
&lt;br&gt;&amp;gt; of OpenSync plugin syncml.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Best regards
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Michael
&lt;/div&gt;&lt;br&gt;&lt;br&gt;-------------------------------------------------------------------------
&lt;br&gt;Check out the new SourceForge.net Marketplace.
&lt;br&gt;It's the best place to buy or sell services for
&lt;br&gt;just about anything Open Source.
&lt;br&gt;&lt;a href=&quot;http://sourceforge.net/services/buy/index.php&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://sourceforge.net/services/buy/index.php&lt;/a&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;Opensync-devel mailing list
&lt;br&gt;&lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=18041699&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Opensync-devel@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://lists.sourceforge.net/lists/listinfo/opensync-devel&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://lists.sourceforge.net/lists/listinfo/opensync-devel&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/libsyncml-HTTP-client-support--tp17614492p18041699.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-18026964</id>
	<title>Bugs in libwbxml</title>
	<published>2008-06-20T03:32:57Z</published>
	<updated>2008-06-20T03:32:57Z</updated>
	<author>
		<name>Michael Bell</name>
	</author>
	<content type="html">Hi,
&lt;br&gt;&lt;br&gt;just for your information ...
&lt;br&gt;&lt;br&gt;libsyncml uses libwbxml for the conversion of XML/WBXML. I discovered 
&lt;br&gt;some bugs in libwbxml which cause error messages like:
&lt;br&gt;&lt;br&gt;String Table generation disabled: can't encode Literal
&lt;br&gt;&lt;br&gt;You can visit the bug at Debian:
&lt;br&gt;&lt;br&gt;&lt;a href=&quot;http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=487217&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=487217&lt;/a&gt;&lt;br&gt;&lt;br&gt;The bug report includes a patch.
&lt;br&gt;&lt;br&gt;Best regards
&lt;br&gt;&lt;br&gt;Michael
&lt;br&gt;-- 
&lt;br&gt;_______________________________________________________________
&lt;br&gt;&lt;br&gt;Michael Bell &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Humboldt-Universitaet zu Berlin
&lt;br&gt;&lt;br&gt;Tel.: +49 (0)30-2093 2482 &amp;nbsp; &amp;nbsp; &amp;nbsp; ZE Computer- und Medienservice
&lt;br&gt;Fax: &amp;nbsp;+49 (0)30-2093 2704 &amp;nbsp; &amp;nbsp; &amp;nbsp; Unter den Linden 6
&lt;br&gt;&lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=18026964&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;michael.bell@...&lt;/a&gt; &amp;nbsp; D-10099 Berlin
&lt;br&gt;_______________________________________________________________
&lt;br&gt;&lt;br&gt;X.509 CA Certificates / Wurzelzertifikate
&lt;br&gt;&lt;br&gt;&lt;a href=&quot;https://pki.pca.dfn.de/hu-berlin-ca/cgi-bin/pub/pki?cmd=getStaticPage;name=index;id=2&amp;RA_ID=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://pki.pca.dfn.de/hu-berlin-ca/cgi-bin/pub/pki?cmd=getStaticPage;name=index;id=2&amp;RA_ID=0&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;br /&gt; &lt;br /&gt;-------------------------------------------------------------------------
&lt;br&gt;Check out the new SourceForge.net Marketplace.
&lt;br&gt;It's the best place to buy or sell services for
&lt;br&gt;just about anything Open Source.
&lt;br&gt;&lt;a href=&quot;http://sourceforge.net/services/buy/index.php&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://sourceforge.net/services/buy/index.php&lt;/a&gt;&lt;br /&gt;_______________________________________________
&lt;br&gt;Opensync-devel mailing list
&lt;br&gt;&lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=18026964&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Opensync-devel@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://lists.sourceforge.net/lists/listinfo/opensync-devel&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://lists.sourceforge.net/lists/listinfo/opensync-devel&lt;/a&gt;&lt;br&gt;&lt;div class=&quot;small&quot;&gt;&lt;br/&gt;&lt;img src=&quot;http://www.nabble.com/images/icon_attachment.gif&quot; &gt; &lt;strong&gt;smime.p7s&lt;/strong&gt; (7K) &lt;a href=&quot;http://www.nabble.com/attachment/18026964/0/smime.p7s&quot; target=&quot;_top&quot;&gt;Download Attachment&lt;/a&gt;&lt;/div&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/Bugs-in-libwbxml-tp18026964p18026964.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-18024032</id>
	<title>Re: test core dump on Solaris</title>
	<published>2008-06-19T23:50:16Z</published>
	<updated>2008-06-19T23:50:16Z</updated>
	<author>
		<name>Jim Li-3</name>
	</author>
	<content type="html">Christian,
&lt;br&gt;&lt;br&gt;&amp;gt; Dear all,
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; on my Solaris build host I see a lot of core files from
&lt;br&gt;&amp;gt; test processes.
&lt;br&gt;&amp;gt;
&lt;br&gt;The main reason for this core is that printf kind function with null 
&lt;br&gt;string will cause core dump on Solaris, But Linux works well for this 
&lt;br&gt;situation. you can define LD_PRELOAD as following before running this 
&lt;br&gt;test to avoid this core:
&lt;br&gt;&lt;br&gt;export LD_PRELOAD=/usr/lib/0\@0.so.1
&lt;br&gt;&lt;br&gt;Jim
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; I attached the output from pstack of the 4 newest cores.
&lt;br&gt;&amp;gt; Anything else needed?
&lt;br&gt;&amp;gt; Should I open a ticket?
&lt;br&gt;&amp;gt; Shpuld we just ignore these core dumps?
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Affected processes are:
&lt;br&gt;&amp;gt; &amp;nbsp; continousbuild/build/tests/engine
&lt;br&gt;&amp;gt; &amp;nbsp; continousbuild/build/tests/error
&lt;br&gt;&amp;gt; &amp;nbsp; continousbuild/build/tests/ipc
&lt;br&gt;&amp;gt; &amp;nbsp; continousbuild/build/tests/updater
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Kind regards
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Christian
&lt;br&gt;&amp;gt; -- 
&lt;br&gt;&amp;gt; Christian Hilgers &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;|ConSol*
&lt;br&gt;&amp;gt; Tel. &amp;nbsp; +49.2102.994-423 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;|Consulting&amp;Solutions Software GmbH
&lt;br&gt;&amp;gt; Fax &amp;nbsp; &amp;nbsp;+49.2102.994-411 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;|Berliner Str. 101, 40880 Ratingen
&lt;br&gt;&amp;gt; email: &lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=18024032&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Christian.Hilgers@...&lt;/a&gt; |WWW: &lt;a href=&quot;http://www.consol.de&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.consol.de&lt;/a&gt;&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;------------------------------------------------------------------------
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;-------------------------------------------------------------------------
&lt;br&gt;&amp;gt;Check out the new SourceForge.net Marketplace.
&lt;br&gt;&amp;gt;It's the best place to buy or sell services for
&lt;br&gt;&amp;gt;just about anything Open Source.
&lt;br&gt;&amp;gt;&lt;a href=&quot;http://sourceforge.net/services/buy/index.php&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://sourceforge.net/services/buy/index.php&lt;/a&gt;&lt;br&gt;&amp;gt; &amp;nbsp;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;------------------------------------------------------------------------
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;_______________________________________________
&lt;br&gt;&amp;gt;Opensync-devel mailing list
&lt;br&gt;&amp;gt;&lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=18024032&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Opensync-devel@...&lt;/a&gt;
&lt;br&gt;&amp;gt;&lt;a href=&quot;https://lists.sourceforge.net/lists/listinfo/opensync-devel&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://lists.sourceforge.net/lists/listinfo/opensync-devel&lt;/a&gt;&lt;br&gt;&amp;gt; &amp;nbsp;
&lt;br&gt;&amp;gt;
&lt;/div&gt;&lt;br&gt;&lt;br&gt;-------------------------------------------------------------------------
&lt;br&gt;Check out the new SourceForge.net Marketplace.
&lt;br&gt;It's the best place to buy or sell services for
&lt;br&gt;just about anything Open Source.
&lt;br&gt;&lt;a href=&quot;http://sourceforge.net/services/buy/index.php&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://sourceforge.net/services/buy/index.php&lt;/a&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;Opensync-devel mailing list
&lt;br&gt;&lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=18024032&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Opensync-devel@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://lists.sourceforge.net/lists/listinfo/opensync-devel&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://lists.sourceforge.net/lists/listinfo/opensync-devel&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/test-core-dump-on-Solaris-tp18007279p18024032.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-18010010</id>
	<title>Re: osync_xmlformat_validate() in format plugins</title>
	<published>2008-06-19T07:18:02Z</published>
	<updated>2008-06-19T07:18:02Z</updated>
	<author>
		<name>Bjoern Ricks</name>
	</author>
	<content type="html">Hi Daniel,
&lt;br&gt;&lt;br&gt;I started coding to get rid of osync_xml_validate and to have only one 
&lt;br&gt;instance of a xml schema for each objtype. Therefore I tried to reuse 
&lt;br&gt;the oop singleton pattern in C via a static GList. Could you please 
&lt;br&gt;review my first intuition because I am more familiar with C++ than C.
&lt;br&gt;&lt;br&gt;best regards,
&lt;br&gt;Bjoern
&lt;div class='shrinkable-quote'&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Hi,
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; i just found that osync_xmlformat_validate() is quite expensive, since it 
&lt;br&gt;&amp;gt; parses for each call the XSLT schemas from scratch (xmlSchemaParse()).
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Callgraph of sync with vformat plugin and the vcard_to_xmlformat converter:
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://cryptomilch.de/~dgollub/OpenSync/opensync_profiling_xmlformat_validate.png&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://cryptomilch.de/~dgollub/OpenSync/opensync_profiling_xmlformat_validate.png&lt;/a&gt;&lt;br&gt;&amp;gt; (Look for the redline in on the left bottom of the callgraph - 991x stands for 
&lt;br&gt;&amp;gt; the 991 function calls.)
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Actually we could do this XSLT schema parsing within in the OpenSync framework 
&lt;br&gt;&amp;gt; once, and validate all xmlformats which got reproted with the same object 
&lt;br&gt;&amp;gt; from a single xmlSchemaParse() call. This would require some changes for 
&lt;br&gt;&amp;gt; osync_xmlformat_*() - i try to prepare a patch within the next days. This 
&lt;br&gt;&amp;gt; would save us 990 of 991 xmlSchemaParse() calls in mentioned example. One 
&lt;br&gt;&amp;gt; call for each used xmlformat. If someone would sync contacts and events this 
&lt;br&gt;&amp;gt; would end up in two xmlSchemParse() calls for xmlformat-event and 
&lt;br&gt;&amp;gt; xmlformat-contact....
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Anyway- for now i would recommend to remove osync_xmlformat_validate() calls 
&lt;br&gt;&amp;gt; from every format plugin converter function. It's O.K. for debugging tools 
&lt;br&gt;&amp;gt; like &amp;quot;vconvert&amp;quot;, but the plugin format conversion routines should be fast ;)
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; I already removed osync_xmlformat_validate() from the vformat plugin and from 
&lt;br&gt;&amp;gt; gnokii-format and palm-format plugins. AFAIK there is only opie-sync and 
&lt;br&gt;&amp;gt; sync4j-sync (is anyone still using this?) left which have 
&lt;br&gt;&amp;gt; osync_xmlformat_validate(), at least in the OpenSync SVN - didn't checked yet 
&lt;br&gt;&amp;gt; other format plugins.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; best regards,
&lt;br&gt;&amp;gt; Daniel
&lt;br&gt;&amp;gt; &amp;nbsp; 
&lt;/div&gt;&lt;/div&gt;-- 
&lt;br&gt;/Bjoern Ricks
&lt;br&gt;&lt;br /&gt;Index: opensync_xmlformat.c
&lt;br&gt;===================================================================
&lt;br&gt;--- opensync_xmlformat.c	(Revision 3370)
&lt;br&gt;+++ opensync_xmlformat.c	(Arbeitskopie)
&lt;br&gt;@@ -91,6 +91,80 @@
&lt;br&gt;&amp;nbsp;	return p;
&lt;br&gt;&amp;nbsp;}
&lt;br&gt;&amp;nbsp;
&lt;br&gt;+OSyncXMLFormatSchema * osync_xmlformat_schema_get_instance(OSyncXMLFormat * xmlformat, OSyncError **error) {
&lt;br&gt;+	static GList * schemas = NULL;
&lt;br&gt;+	OSyncXMLFormatSchema * osyncschema = NULL;
&lt;br&gt;+	GList * entry;
&lt;br&gt;+	const char * objtype;
&lt;br&gt;+	
&lt;br&gt;+	osync_trace(TRACE_ENTRY, &amp;quot;%s(%p, %p)&amp;quot;, __func__, xmlformat, error);
&lt;br&gt;+	
&lt;br&gt;+	osync_assert(xmlformat);
&lt;br&gt;+	
&lt;br&gt;+	objtype = osync_xmlformat_get_objtype(xmlformat);
&lt;br&gt;+	//TODO get mutex
&lt;br&gt;+	// find schema for objtype
&lt;br&gt;+	for ( entry = schemas; entry != NULL; entry=entry-&amp;gt;next) { // should be fast enough for only a few objtypes
&lt;br&gt;+		osyncschema = (OSyncXMLFormatSchema *) entry-&amp;gt;data;
&lt;br&gt;+		if (!strcmp(osyncschema-&amp;gt;objtype, objtype) ) {
&lt;br&gt;+			return osyncschema;
&lt;br&gt;+		}
&lt;br&gt;+		osyncschema = NULL;
&lt;br&gt;+	}
&lt;br&gt;+	if ( osyncschema == NULL ) {
&lt;br&gt;+		osyncschema = osync_try_malloc0(sizeof(OSyncXMLFormatSchema), error);
&lt;br&gt;+		if(!osyncschema) {
&lt;br&gt;+			osync_trace(TRACE_EXIT_ERROR, &amp;quot;%s: %s&amp;quot; , __func__, osync_error_print(error));
&lt;br&gt;+			//TODO release mutex
&lt;br&gt;+			return NULL;
&lt;br&gt;+		}
&lt;br&gt;+		osyncschema-&amp;gt;objtype = g_strdup(objtype);
&lt;br&gt;+		char *schemafilepath = g_strdup_printf(&amp;quot;%s%c%s%s%s&amp;quot;,
&lt;br&gt;+			OPENSYNC_SCHEMASDIR,
&lt;br&gt;+			G_DIR_SEPARATOR,
&lt;br&gt;+			&amp;quot;xmlformat-&amp;quot;,
&lt;br&gt;+			osyncschema-&amp;gt;objtype,
&lt;br&gt;+			&amp;quot;.xsd&amp;quot;);
&lt;br&gt;+		
&lt;br&gt;+	 	xmlSchemaParserCtxtPtr xmlSchemaParserCtxt;
&lt;br&gt;+	 	xmlSchemaPtr xmlSchema;
&lt;br&gt;+	 	xmlSchemaValidCtxtPtr xmlSchemaValidCtxt;
&lt;br&gt;+		
&lt;br&gt;+	 	xmlSchemaParserCtxt = xmlSchemaNewParserCtxt(schemafilepath);
&lt;br&gt;+	 	osyncschema-&amp;gt;schema = xmlSchemaParse(xmlSchemaParserCtxt);
&lt;br&gt;+	 	xmlSchemaFreeParserCtxt(xmlSchemaParserCtxt);
&lt;br&gt;+
&lt;br&gt;+	 	osyncschema-&amp;gt;context = xmlSchemaNewValidCtxt(xmlSchema);
&lt;br&gt;+	 	if (osyncschema-&amp;gt;context == NULL) {
&lt;br&gt;+	 		xmlSchemaFree(osyncschema-&amp;gt;schema);
&lt;br&gt;+	 		g_free(osyncschema-&amp;gt;objtype);
&lt;br&gt;+	 		g_free(osyncschema);
&lt;br&gt;+	 		osyncschema = NULL;
&lt;br&gt;+	 		//TODO set error
&lt;br&gt;+	 	}
&lt;br&gt;+	 	schemas = g_list_append(schemas, osyncschema);
&lt;br&gt;+	}
&lt;br&gt;+	//TODO release mutex
&lt;br&gt;+	return osyncschema;
&lt;br&gt;+	
&lt;br&gt;+}
&lt;br&gt;+
&lt;br&gt;+
&lt;br&gt;+osync_bool osync_xmlformat_schema_validate(OSyncXMLFormatSchema * schema, OSyncXMLFormat * xmlformat)
&lt;br&gt;+{
&lt;br&gt;+	osync_assert(xmlformat);
&lt;br&gt;+	osync_assert(schema);
&lt;br&gt;+	
&lt;br&gt;+	int rc = 0;
&lt;br&gt;+
&lt;br&gt;+	/* Validate the document */
&lt;br&gt;+	rc = xmlSchemaValidateDoc(schema-&amp;gt;context, xmlformat-&amp;gt;doc);
&lt;br&gt;+
&lt;br&gt;+	if(rc != 0)
&lt;br&gt;+ 		return FALSE;
&lt;br&gt;+	return TRUE;
&lt;br&gt;+}
&lt;br&gt;+
&lt;br&gt;&amp;nbsp;/**
&lt;br&gt;&amp;nbsp; * @brief Validate the xmlformat against its schema in inidivual path
&lt;br&gt;&amp;nbsp; * @param xmlformat The pointer to a xmlformat object 
&lt;br&gt;@@ -399,8 +473,9 @@
&lt;br&gt;&amp;nbsp;osync_bool osync_xmlformat_validate(OSyncXMLFormat *xmlformat)
&lt;br&gt;&amp;nbsp;{
&lt;br&gt;&amp;nbsp;	osync_assert(xmlformat);
&lt;br&gt;-
&lt;br&gt;-	return _osync_xmlformat_validate(xmlformat, NULL);
&lt;br&gt;+	
&lt;br&gt;+	OSyncXMLFormatSchema * schema = osync_xmlformat_schema_get_instance(xmlformat, NULL);
&lt;br&gt;+	return osync_xmlformat_schema_validate(schema, xmlformat);
&lt;br&gt;&amp;nbsp;}
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp;/**
&lt;br&gt;Index: opensync_xmlformat_internals.h
&lt;br&gt;===================================================================
&lt;br&gt;--- opensync_xmlformat_internals.h	(Revision 3370)
&lt;br&gt;+++ opensync_xmlformat_internals.h	(Arbeitskopie)
&lt;br&gt;@@ -45,7 +45,20 @@
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp;};
&lt;br&gt;&amp;nbsp;
&lt;br&gt;+struct OSyncXMLFormatSchema {
&lt;br&gt;+	
&lt;br&gt;+	xmlSchemaPtr schema;
&lt;br&gt;+	
&lt;br&gt;+	xmlSchemaValidCtxtPtr context;
&lt;br&gt;+	
&lt;br&gt;+	const char *objtype
&lt;br&gt;+};
&lt;br&gt;+
&lt;br&gt;&amp;nbsp;int _osync_xmlformat_get_points(OSyncXMLPoints points[], int* cur_pos, int basic_points, const char* fieldname);
&lt;br&gt;&amp;nbsp;osync_bool _osync_xmlformat_validate(OSyncXMLFormat *xmlformat, const char *path);
&lt;br&gt;&amp;nbsp;
&lt;br&gt;+OSyncXMLFormatSchema * osync_xmlformat_schema_get_instance(OSyncXMLFormat * xmlformat, OSyncError **error) 
&lt;br&gt;+void osync_xmlformat_schema_free_instance(OSyncXMLFormatSchema * &amp;nbsp;schema, OSyncError **error);
&lt;br&gt;+osync_bool osync_xmlformat_schema_validate(OSyncXMLFormatSchema * schema, OSyncXMLFormat * xmlformat);
&lt;br&gt;+
&lt;br&gt;&amp;nbsp;#endif /*OPENSYNC_XMLFORMAT_INTERNAL_H_*/
&lt;br&gt;&lt;br /&gt;-------------------------------------------------------------------------
&lt;br&gt;Check out the new SourceForge.net Marketplace.
&lt;br&gt;It's the best place to buy or sell services for
&lt;br&gt;just about anything Open Source.
&lt;br&gt;&lt;a href=&quot;http://sourceforge.net/services/buy/index.php&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://sourceforge.net/services/buy/index.php&lt;/a&gt;&lt;br /&gt;_______________________________________________
&lt;br&gt;Opensync-devel mailing list
&lt;br&gt;&lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=18010010&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Opensync-devel@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://lists.sourceforge.net/lists/listinfo/opensync-devel&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://lists.sourceforge.net/lists/listinfo/opensync-devel&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/osync_xmlformat_validate%28%29-in-format-plugins-tp17036168p18010010.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-18007734</id>
	<title>Re: test core dump on Solaris</title>
	<published>2008-06-19T05:19:46Z</published>
	<updated>2008-06-19T05:19:46Z</updated>
	<author>
		<name>Halton Huo</name>
	</author>
	<content type="html">Jim is looking at these issues. There are some things cause Solaris fail
&lt;br&gt;but Linux okay.
&lt;br&gt;&lt;br&gt;- shell 
&lt;br&gt;&amp;nbsp; Linux is bash by default, solaris is sh
&lt;br&gt;- diff
&lt;br&gt;- named pipe
&lt;br&gt;&lt;br&gt;&lt;br&gt;Thanks,
&lt;br&gt;Halton.
&lt;br&gt;&lt;br&gt;On Thu, 2008-06-19 at 13:53 +0200, Christian Hilgers wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Dear all,
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; on my Solaris build host I see a lot of core files from
&lt;br&gt;&amp;gt; test processes.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; I attached the output from pstack of the 4 newest cores.
&lt;br&gt;&amp;gt; Anything else needed?
&lt;br&gt;&amp;gt; Should I open a ticket?
&lt;br&gt;&amp;gt; Shpuld we just ignore these core dumps?
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Affected processes are:
&lt;br&gt;&amp;gt; &amp;nbsp; continousbuild/build/tests/engine
&lt;br&gt;&amp;gt; &amp;nbsp; continousbuild/build/tests/error
&lt;br&gt;&amp;gt; &amp;nbsp; continousbuild/build/tests/ipc
&lt;br&gt;&amp;gt; &amp;nbsp; continousbuild/build/tests/updater
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Kind regards
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Christian
&lt;br&gt;&amp;gt; --
&lt;br&gt;&amp;gt; Christian Hilgers &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;|ConSol*
&lt;br&gt;&amp;gt; Tel. &amp;nbsp; +49.2102.994-423 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;|Consulting&amp;Solutions Software GmbH
&lt;br&gt;&amp;gt; Fax &amp;nbsp; &amp;nbsp;+49.2102.994-411 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;|Berliner Str. 101, 40880 Ratingen
&lt;br&gt;&amp;gt; email: &lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=18007734&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Christian.Hilgers@...&lt;/a&gt; |WWW: &lt;a href=&quot;http://www.consol.de&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.consol.de&lt;/a&gt;&lt;br&gt;&amp;gt; -------------------------------------------------------------------------
&lt;br&gt;&amp;gt; Check out the new SourceForge.net Marketplace.
&lt;br&gt;&amp;gt; It's the best place to buy or sell services for
&lt;br&gt;&amp;gt; just about anything Open Source.
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://sourceforge.net/services/buy/index.php&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://sourceforge.net/services/buy/index.php&lt;/a&gt;&lt;br&gt;&amp;gt; _______________________________________________
&lt;br&gt;&amp;gt; Opensync-devel mailing list
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=18007734&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Opensync-devel@...&lt;/a&gt;
&lt;br&gt;&amp;gt; &lt;a href=&quot;https://lists.sourceforge.net/lists/listinfo/opensync-devel&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://lists.sourceforge.net/lists/listinfo/opensync-devel&lt;/a&gt;&lt;/div&gt;&lt;br&gt;&lt;br&gt;-------------------------------------------------------------------------
&lt;br&gt;Check out the new SourceForge.net Marketplace.
&lt;br&gt;It's the best place to buy or sell services for
&lt;br&gt;just about anything Open Source.
&lt;br&gt;&lt;a href=&quot;http://sourceforge.net/services/buy/index.php&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://sourceforge.net/services/buy/index.php&lt;/a&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;Opensync-devel mailing list
&lt;br&gt;&lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=18007734&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Opensync-devel@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://lists.sourceforge.net/lists/listinfo/opensync-devel&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://lists.sourceforge.net/lists/listinfo/opensync-devel&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/test-core-dump-on-Solaris-tp18007279p18007734.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-18007279</id>
	<title>test core dump on Solaris</title>
	<published>2008-06-19T04:53:05Z</published>
	<updated>2008-06-19T04:53:05Z</updated>
	<author>
		<name>Christian Hilgers-2</name>
	</author>
	<content type="html">Dear all,
&lt;br&gt;&lt;br&gt;on my Solaris build host I see a lot of core files from
&lt;br&gt;test processes.
&lt;br&gt;&lt;br&gt;I attached the output from pstack of the 4 newest cores.
&lt;br&gt;Anything else needed?
&lt;br&gt;Should I open a ticket?
&lt;br&gt;Shpuld we just ignore these core dumps?
&lt;br&gt;&lt;br&gt;Affected processes are:
&lt;br&gt;&amp;nbsp; continousbuild/build/tests/engine
&lt;br&gt;&amp;nbsp; continousbuild/build/tests/error
&lt;br&gt;&amp;nbsp; continousbuild/build/tests/ipc
&lt;br&gt;&amp;nbsp; continousbuild/build/tests/updater
&lt;br&gt;&lt;br&gt;Kind regards
&lt;br&gt;&lt;br&gt;Christian
&lt;br&gt;--
&lt;br&gt;Christian Hilgers &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;|ConSol*
&lt;br&gt;Tel. &amp;nbsp; +49.2102.994-423 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;|Consulting&amp;Solutions Software GmbH
&lt;br&gt;Fax &amp;nbsp; &amp;nbsp;+49.2102.994-411 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;|Berliner Str. 101, 40880 Ratingen
&lt;br&gt;email: &lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=18007279&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Christian.Hilgers@...&lt;/a&gt; |WWW: &lt;a href=&quot;http://www.consol.de&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.consol.de&lt;/a&gt;&lt;br&gt;&lt;br /&gt; &lt;br /&gt;-------------------------------------------------------------------------
&lt;br&gt;Check out the new SourceForge.net Marketplace.
&lt;br&gt;It's the best place to buy or sell services for
&lt;br&gt;just about anything Open Source.
&lt;br&gt;&lt;a href=&quot;http://sourceforge.net/services/buy/index.php&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://sourceforge.net/services/buy/index.php&lt;/a&gt;&lt;br /&gt;_______________________________________________
&lt;br&gt;Opensync-devel mailing list
&lt;br&gt;&lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=18007279&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Opensync-devel@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://lists.sourceforge.net/lists/listinfo/opensync-devel&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://lists.sourceforge.net/lists/listinfo/opensync-devel&lt;/a&gt;&lt;br&gt;&lt;div class=&quot;small&quot;&gt;&lt;br/&gt;&lt;img src=&quot;http://www.nabble.com/images/icon_attachment.gif&quot; &gt; &lt;strong&gt;pstack.out.gz&lt;/strong&gt; (2K) &lt;a href=&quot;http://www.nabble.com/attachment/18007279/0/pstack.out.gz&quot; target=&quot;_top&quot;&gt;Download Attachment&lt;/a&gt;&lt;/div&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/test-core-dump-on-Solaris-tp18007279p18007279.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-17983406</id>
	<title>Re: Patch for unit test failure and error only on Solaris</title>
	<published>2008-06-18T07:02:09Z</published>
	<updated>2008-06-18T07:02:09Z</updated>
	<author>
		<name>Jim Li-3</name>
	</author>
	<content type="html">Daniel:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt;&amp;gt; +/*! @brief Copy files
&lt;br&gt;&amp;gt;&amp;gt; + *
&lt;br&gt;&amp;gt;&amp;gt; + * @param source source filename
&lt;br&gt;&amp;gt;&amp;gt; + * @param dest destination filename
&lt;br&gt;&amp;gt;&amp;gt; + * @returns TRUE on success, FALSE otherwise
&lt;br&gt;&amp;gt;&amp;gt; + *
&lt;br&gt;&amp;gt;&amp;gt; + */
&lt;br&gt;&amp;gt;&amp;gt; +osync_bool osync_testing_file_copy(const char *source, const char *dest)
&lt;br&gt;&amp;gt;&amp;gt; +{
&lt;br&gt;&amp;gt;&amp;gt; + &amp;nbsp; &amp;nbsp; &amp;nbsp; gchar *cmd;
&lt;br&gt;&amp;gt;&amp;gt; + &amp;nbsp; &amp;nbsp; &amp;nbsp; int ret;
&lt;br&gt;&amp;gt;&amp;gt; +
&lt;br&gt;&amp;gt;&amp;gt; + &amp;nbsp; &amp;nbsp; &amp;nbsp; cmd = g_strdup_printf (&amp;quot;cp %s %s&amp;quot;, source, dest);
&lt;br&gt;&amp;gt;&amp;gt; + &amp;nbsp; &amp;nbsp; &amp;nbsp; ret = system (cmd);
&lt;br&gt;&amp;gt;&amp;gt; + &amp;nbsp; &amp;nbsp; &amp;nbsp; g_free (cmd);
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; (Is there a certain reason for putting space between the function name and the 
&lt;br&gt;&amp;gt; arguments list? Not quite sure if this declared in the CODING file either...)
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; 
&lt;/div&gt;Not really! I'll modify this before commitment!
&lt;br&gt;&lt;br&gt;Thanks
&lt;br&gt;&lt;br&gt;Jim
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt;&amp;gt; + &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt; + &amp;nbsp; &amp;nbsp; &amp;nbsp; return ret;
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; -------------------------------------------------------------------------
&lt;br&gt;&amp;gt; Check out the new SourceForge.net Marketplace.
&lt;br&gt;&amp;gt; It's the best place to buy or sell services for
&lt;br&gt;&amp;gt; just about anything Open Source.
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://sourceforge.net/services/buy/index.php&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://sourceforge.net/services/buy/index.php&lt;/a&gt;&lt;br&gt;&amp;gt; _______________________________________________
&lt;br&gt;&amp;gt; Opensync-devel mailing list
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=17983406&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Opensync-devel@...&lt;/a&gt;
&lt;br&gt;&amp;gt; &lt;a href=&quot;https://lists.sourceforge.net/lists/listinfo/opensync-devel&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://lists.sourceforge.net/lists/listinfo/opensync-devel&lt;/a&gt;&lt;br&gt;&amp;gt; &amp;nbsp; 
&lt;/div&gt;&lt;br&gt;&lt;br&gt;-------------------------------------------------------------------------
&lt;br&gt;Check out the new SourceForge.net Marketplace.
&lt;br&gt;It's the best place to buy or sell services for
&lt;br&gt;just about anything Open Source.
&lt;br&gt;&lt;a href=&quot;http://sourceforge.net/services/buy/index.php&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://sourceforge.net/services/buy/index.php&lt;/a&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;Opensync-devel mailing list
&lt;br&gt;&lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=17983406&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Opensync-devel@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://lists.sourceforge.net/lists/listinfo/opensync-devel&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://lists.sourceforge.net/lists/listinfo/opensync-devel&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/Patch-for-unit-test-failure-and-error-only-on-Solaris-tp17744110p17983406.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-17979824</id>
	<title>Re: Patch for unit test failure and error only on Solaris</title>
	<published>2008-06-18T03:23:25Z</published>
	<updated>2008-06-18T03:23:25Z</updated>
	<author>
		<name>Daniel Gollub</name>
	</author>
	<content type="html">On Wednesday 18 June 2008 11:46:48 Jim Li wrote:
&lt;br&gt;&amp;gt; I rewrite the patch according to your great suggestion. please help me
&lt;br&gt;&amp;gt; to review it again.
&lt;br&gt;&amp;gt;
&lt;br&gt;[...]
&lt;br&gt;&lt;br&gt;Looks, good to me. We may replace the osync_testing_file_copy() code with 
&lt;br&gt;something more portable (and secure?) later. Feel free to commit.
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; +/*! @brief Copy files
&lt;br&gt;&amp;gt; + *
&lt;br&gt;&amp;gt; + * @param source source filename
&lt;br&gt;&amp;gt; + * @param dest destination filename
&lt;br&gt;&amp;gt; + * @returns TRUE on success, FALSE otherwise
&lt;br&gt;&amp;gt; + *
&lt;br&gt;&amp;gt; + */
&lt;br&gt;&amp;gt; +osync_bool osync_testing_file_copy(const char *source, const char *dest)
&lt;br&gt;&amp;gt; +{
&lt;br&gt;&amp;gt; +       gchar *cmd;
&lt;br&gt;&amp;gt; +       int ret;
&lt;br&gt;&amp;gt; +
&lt;br&gt;&amp;gt; +       cmd = g_strdup_printf (&amp;quot;cp %s %s&amp;quot;, source, dest);
&lt;br&gt;&amp;gt; +       ret = system (cmd);
&lt;br&gt;&amp;gt; +       g_free (cmd);
&lt;/div&gt;&lt;br&gt;(Is there a certain reason for putting space between the function name and the 
&lt;br&gt;arguments list? Not quite sure if this declared in the CODING file either...)
&lt;br&gt;&lt;br&gt;&amp;gt; +        
&lt;br&gt;&amp;gt; +       return ret;
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;-------------------------------------------------------------------------
&lt;br&gt;Check out the new SourceForge.net Marketplace.
&lt;br&gt;It's the best place to buy or sell services for
&lt;br&gt;just about anything Open Source.
&lt;br&gt;&lt;a href=&quot;http://sourceforge.net/services/buy/index.php&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://sourceforge.net/services/buy/index.php&lt;/a&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;Opensync-devel mailing list
&lt;br&gt;&lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=17979824&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Opensync-devel@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://lists.sourceforge.net/lists/listinfo/opensync-devel&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://lists.sourceforge.net/lists/listinfo/opensync-devel&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/Patch-for-unit-test-failure-and-error-only-on-Solaris-tp17744110p17979824.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-17979368</id>
	<title>Re: Patch for unit test failure and error only on Solaris</title>
	<published>2008-06-18T02:46:48Z</published>
	<updated>2008-06-18T02:46:48Z</updated>
	<author>
		<name>Jim Li-3</name>
	</author>
	<content type="html">Daniel:
&lt;br&gt;&lt;br&gt;I rewrite the patch according to your great suggestion. please help me 
&lt;br&gt;to review it again.
&lt;br&gt;&lt;br&gt;Thanks
&lt;br&gt;&lt;br&gt;jim
&lt;div class='shrinkable-quote'&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; On Monday 09 June 2008 18:31:52 Jim Li wrote:
&lt;br&gt;&amp;gt; &amp;nbsp; 
&lt;br&gt;&amp;gt;&amp;gt; Hi All,
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; This patch fix two different behavior between Linux and Solaris:
&lt;br&gt;&amp;gt;&amp;gt; 1. The default shell of system on Solaris is sh which can't explain
&lt;br&gt;&amp;gt;&amp;gt; &amp;quot;test \&amp;quot;x$(ls data1)\&amp;quot; = \&amp;quot;xtestdata\&amp;quot;&amp;quot; correctly. we use `` to replace
&lt;br&gt;&amp;gt;&amp;gt; $ which can work well both for sh and bash which means it make unit test
&lt;br&gt;&amp;gt;&amp;gt; work well both on Linux and on Solaris
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Actually we should get rid of all those system() calls, if possible.
&lt;br&gt;&amp;gt; Irene already pointed this out in some other testcases. I introduced some &amp;nbsp;
&lt;br&gt;&amp;gt; simple testhelper funciton which should replace those system calls:
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://opensync.org/changeset/3279&qu