projects
/
yazpp-moved-to-github.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Use odr_create_Odr_oct
[yazpp-moved-to-github.git]
/
zlint
/
zlint.cpp
diff --git
a/zlint/zlint.cpp
b/zlint/zlint.cpp
index
88aa73f
..
b8b8d59
100644
(file)
--- a/
zlint/zlint.cpp
+++ b/
zlint/zlint.cpp
@@
-14,6
+14,7
@@
#include <yaz/otherinfo.h>
#include <yaz/charneg.h>
#include <yaz/log.h>
#include <yaz/otherinfo.h>
#include <yaz/charneg.h>
#include <yaz/log.h>
+#include <yaz/odr.h>
#include <zlint.h>
#include <zlint.h>
@@
-149,12
+150,7
@@
IPDU_Observer *Zlint::sessionNotify(
Z_ReferenceId *Zlint::mk_refid(const char *buf, int len)
{
Z_ReferenceId *Zlint::mk_refid(const char *buf, int len)
{
- Z_ReferenceId *id =
- (Z_ReferenceId *) odr_malloc(odr_encode(), sizeof(*id));
- id->size = id->len = len;
- id->buf = (unsigned char*) odr_malloc(odr_encode(), len);
- memcpy(id->buf, buf, len);
- return id;
+ return odr_create_Odr_oct(odr_encode(), buf, len);
}
int Zlint::initResponseGetVersion(Z_InitResponse *init)
}
int Zlint::initResponseGetVersion(Z_InitResponse *init)