Update of /cvsroot/refdb/refdb/src
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6267
Modified Files:
Tag: Release_0_9_5_stable
refdbdbib.c
Log Message:
fix rewinding in send_stylespec()
Index: refdbdbib.c
===================================================================
RCS file: /cvsroot/refdb/refdb/src/refdbdbib.c,v
retrieving revision 1.36.2.24
retrieving revision 1.36.2.25
diff -u -U2 -r1.36.2.24 -r1.36.2.25
--- refdbdbib.c 11 Sep 2005 19:55:12 -0000 1.36.2.24
+++ refdbdbib.c 17 Sep 2005 21:36:53 -0000 1.36.2.25
@@ -2502,4 +2502,5 @@
int i; /* guess what */
int error; /* if not 0 an error occurred */
+ int haverow;
unsigned long long n_id;
char inbuffer[COMMAND_INBUF_LEN]; /* buffer for incoming data */
@@ -2696,9 +2697,12 @@
}
- /* rewind */
- dbi_result_first_row(dbires_ref);
+
+ /* rewind. we can't jump to the first row and then use next_row as
+ this would skip the first row. Instead we use next_row at the
+ bottom of the while loop */
+ haverow = dbi_result_first_row(dbires_ref);
/* loop over all publication types */
- while (dbi_result_next_row(dbires_ref)) {
+ while (haverow) {
item_pubtype = dbi_result_get_string_idx(dbires_ref, 1); /* 1-base index */
@@ -2721,4 +2725,5 @@
} /* end if */
} /* end for */
+ haverow = dbi_result_next_row(dbires_ref);
} /* end while */
|