Update of /cvsroot/refdb/refdb/src
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29512/src
Modified Files:
Tag: Release_0_9_5_stable
noteshandler.c
Log Message:
fixed handling of content contents
Index: noteshandler.c
===================================================================
RCS file: /cvsroot/refdb/refdb/src/noteshandler.c,v
retrieving revision 1.18.2.1
retrieving revision 1.18.2.2
diff -u -U2 -r1.18.2.1 -r1.18.2.2
--- noteshandler.c 24 Jun 2004 21:10:07 -0000 1.18.2.1
+++ noteshandler.c 25 Oct 2004 21:16:32 -0000 1.18.2.2
@@ -504,4 +504,6 @@
(ptr_andata->nmem_error)++;
}
+
+/* printf("found content descentant %s<<\n", el); */
new_notepool = mstrcat(ptr_andata->notepool, (char*)el, &(ptr_andata->notepool_len), 0);
@@ -539,4 +541,5 @@
(ptr_andata->nmem_error)++;
}
+/* printf("notepool went to %s<<\n", ptr_andata->notepool); */
}
/* else: ignore */
@@ -799,12 +802,13 @@
/* ------------------------------------------------------------ */
else if (!strcmp(el, "content")) {
- if (ptr_andata->ptr_first->ptr_elvalue && *ptr_andata->ptr_first->ptr_elvalue) {
- result = set_notesdata_field("content", ptr_andata->ptr_first->ptr_elvalue, ptr_andata->conn, ptr_andata->driver, ptr_andata->n_note_id);
- }
- else {
+ if (ptr_andata->notepool && *(ptr_andata->notepool)) {
result = set_notesdata_field("content", ptr_andata->notepool, ptr_andata->conn, ptr_andata->driver, ptr_andata->n_note_id);
+/* printf("notepool went to %s<<\n", ptr_andata->notepool); */
free(ptr_andata->notepool);
ptr_andata->notepool = NULL;
}
+ else if (ptr_andata->ptr_first->ptr_elvalue && *ptr_andata->ptr_first->ptr_elvalue) {
+ result = set_notesdata_field("content", ptr_andata->ptr_first->ptr_elvalue, ptr_andata->conn, ptr_andata->driver, ptr_andata->n_note_id);
+ }
if (result == 1) {
@@ -1055,4 +1059,6 @@
(ptr_andata->nmem_error)++;
}
+
+/* printf("in endhandler: notepool went to %s<<\n", ptr_andata->notepool); */
}
/* else: ignore */
|