projects
/
yaz-moved-to-github.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
1274cfd
)
Ensure that send_present doesn't use ODR if present is not performed
author
Adam Dickmeiss
<adam@indexdata.dk>
Sun, 25 Aug 2002 06:48:18 +0000
(06:48 +0000)
committer
Adam Dickmeiss
<adam@indexdata.dk>
Sun, 25 Aug 2002 06:48:18 +0000
(06:48 +0000)
zoom/zoom-c.c
patch
|
blob
|
history
diff --git
a/zoom/zoom-c.c
b/zoom/zoom-c.c
index
dcc71a3
..
522660a
100644
(file)
--- a/
zoom/zoom-c.c
+++ b/
zoom/zoom-c.c
@@
-1,5
+1,5
@@
/*
/*
- * $Id: zoom-c.c,v 1.41 2002-08-24 09:28:30 oleg Exp $
+ * $Id: zoom-c.c,v 1.42 2002-08-25 06:48:18 adam Exp $
*
* ZOOM layer for C, connections, result sets, queries.
*/
*
* ZOOM layer for C, connections, result sets, queries.
*/
@@
-142,12
+142,6
@@
void ZOOM_connection_remove_task (ZOOM_connection c)
assert (0);
}
xfree (task);
assert (0);
}
xfree (task);
- /*
- Fix me!!! May be it is not right place for reset of the ODR stream,
- but if happens to read records from cache we will be get memory leaks
- without it (see send_present()).
- */
- odr_reset(c->odr_out);
}
}
}
}
@@
-1413,8
+1407,8
@@
static int send_sort (ZOOM_connection c)
static int send_present (ZOOM_connection c)
{
static int send_present (ZOOM_connection c)
{
- Z_APDU *apdu = zget_APDU(c->odr_out, Z_APDU_presentRequest);
- Z_PresentRequest *req = apdu->u.presentRequest;
+ Z_APDU *apdu = 0;
+ Z_PresentRequest *req = 0;
int i = 0;
const char *syntax = 0;
const char *elementSetName = 0;
int i = 0;
const char *syntax = 0;
const char *elementSetName = 0;
@@
-1461,6
+1455,9
@@
static int send_present (ZOOM_connection c)
if (i == resultset->count)
return 0;
if (i == resultset->count)
return 0;
+ apdu = zget_APDU(c->odr_out, Z_APDU_presentRequest);
+ req = apdu->u.presentRequest;
+
resultset->start += i;
resultset->count -= i;
*req->resultSetStartPoint = resultset->start + 1;
resultset->start += i;
resultset->count -= i;
*req->resultSetStartPoint = resultset->start + 1;