Re: [gnome-db] database xml - xml database new from uri



On Tue, 2003-08-26 at 18:36 +0200, Philippe CHARLIER wrote:
> Still in "xml database new from uri",
> 
> I get the following message (after making the "!strcmp ... continue"
> correction from my previous mail) :
> 
> ** (program:10539): CRITICAL **: file gda-util.c: line 77
> (gda_type_from_string): assertion `str != NULL' failed
> 
> It seems that the error provides from the fact that when the file was
> created, "<value>" was like this :
> 
>   <value position="0" gdatype="string">EBBR</value>
> 
> and the function "gda_value_new_from_xml()" in the file "gda_value.c",
> lone 809 tests for "type" instead of "gdatype" :
> 
>  ... gda_type_from_string (xmlGetProp (node, "type") ...
> 
> It works with ... gda_type_from_string (xmlGetProp (node, "gdatype") ...
> 
patch to fix it attached.

cheers
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/libgda/ChangeLog,v
retrieving revision 1.560
diff -u -p -r1.560 ChangeLog
--- ChangeLog	25 Aug 2003 19:59:23 -0000	1.560
+++ ChangeLog	26 Aug 2003 17:29:46 -0000
@@ -1,3 +1,10 @@
+2003-08-26  Philippe CHARLIER <p charlier chello be>
+
+	* libgda/gda-value.c (gda_value_new_from_xml): the type is stored in
+	the "gdatype" property, not "type".
+
+	* libgda/gda-data-model.c (add_xml_row): fixed typo in call to strcmp().
+
 2003-08-25  Rodrigo Moya <rodrigo gnome-db org>
 
 	* libgda/gda-xml-database.c (gda_xml_database_new_table_from_node):
Index: libgda/gda-value.c
===================================================================
RCS file: /cvs/gnome/libgda/libgda/gda-value.c,v
retrieving revision 1.55
diff -u -p -r1.55 gda-value.c
--- libgda/gda-value.c	24 Aug 2003 04:11:06 -0000	1.55
+++ libgda/gda-value.c	26 Aug 2003 17:29:46 -0000
@@ -806,7 +806,7 @@ gda_value_new_from_xml (const xmlNodePtr
 	value = g_new0 (GdaValue, 1);
 	if (!gda_value_set_from_string (value,
 					xmlNodeGetContent (node),
-					gda_type_from_string (xmlGetProp (node, "type")))) {
+					gda_type_from_string (xmlGetProp (node, "gdatype")))) {
 		g_free (value);
 		value = NULL;
 	}


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]