X-Git-Url: http://git.indexdata.com/?p=yaz-moved-to-github.git;a=blobdiff_plain;f=src%2Fcharneg.c;h=9986f537063f23dafdc358b7ae6706973cfeae8a;hp=4794d7cbc061f74967cca266ec5e34351f47ce2f;hb=c57f145946e02d33035cf27878a3ff618e77d6a2;hpb=69b1d8e7b437179163fe97b7cbead51a56835f2a diff --git a/src/charneg.c b/src/charneg.c index 4794d7c..9986f53 100644 --- a/src/charneg.c +++ b/src/charneg.c @@ -28,20 +28,10 @@ static Z_External* z_ext_record2(ODR o, const char *buf) return 0; p->descriptor = 0; p->indirect_reference = 0; - p->direct_reference = odr_oiddup(o, yaz_oid_negot_charset_id); - p->which = Z_External_octet; - if (!(p->u.octet_aligned = (Odr_oct *)odr_malloc(o, sizeof(Odr_oct)))) - return 0; - if (!(p->u.octet_aligned->buf = (char *)odr_malloc(o, len))) - return 0; - p->u.octet_aligned->len = len; -#if OCT_SIZE - p->u.octet_aligned->size = len; -#endif - memcpy(p->u.octet_aligned->buf, buf, len); - + p->u.octet_aligned = + odr_create_Odr_oct(o, buf, len); return p; }