X-Git-Url: http://git.indexdata.com/?p=yaz-moved-to-github.git;a=blobdiff_plain;f=src%2Fzoom-sru.c;h=b3c34cb754909b5de2110cf6e1bd33b402ef418f;hp=85f597b5c4805ba2c76126b6e69792d12ec43dbb;hb=a3fb0c980a8e4d3ef7231abb92f0c399197ed97d;hpb=cabcc223cd47503763e7c42969e3be30c58276af diff --git a/src/zoom-sru.c b/src/zoom-sru.c index 85f597b..b3c34cb 100644 --- a/src/zoom-sru.c +++ b/src/zoom-sru.c @@ -329,16 +329,10 @@ static zoom_ret handle_srw_response(ZOOM_connection c, npr->u.databaseRecord->indirect_reference = 0; npr->u.databaseRecord->which = Z_External_octet; - npr->u.databaseRecord->u.octet_aligned = (Odr_oct *) - odr_malloc(c->odr_in, sizeof(Odr_oct)); - npr->u.databaseRecord->u.octet_aligned->buf = (unsigned char*) - sru_rec->recordData_buf; - npr->u.databaseRecord->u.octet_aligned->len = - sru_rec->recordData_len; -#if OCT_SIZE - npr->u.databaseRecord->u.octet_aligned->size = - sru_rec->recordData_len; -#endif + npr->u.databaseRecord->u.octet_aligned = + odr_create_Odr_oct(c->odr_in, + sru_rec->recordData_buf, + sru_rec->recordData_len); if (sru_rec->recordSchema && !strcmp(sru_rec->recordSchema, "info:srw/schema/1/diagnostics-v1.1"))