-#if 0
- Odr_oct sutrs_asn;
- Odr_oct *sp = &sutrs_asn;
- Odr_any *single = odr_malloc(a->encode, sizeof(*single));
- char *buf, *remember;
- int len, s_remember;
-
- sutrs_asn.buf = (unsigned char*) fres->record;
- sutrs_asn.len = sutrs_asn.size = fres->len;
- /*
- * we borrow the encoding stream for preparing the buffer. This
- * is not the most elegant solution - a better way might have been
- * to reserve a different stream, or to devise a better system
- * for handling externals in general.
- */
- remember = odr_getbuf(a->encode, &len, &s_remember);
- buf = odr_malloc(a->encode, fres->len + 10); /* buf for encoding */
- odr_setbuf(a->encode, buf, fres->len + 10, 0); /* can_grow==0 */
- if (!z_SUTRS(a->encode, &sp, 0))
- {
- logf(LOG_LOG, "ODR error encoding SUTRS: %s",
- odr_errlist[odr_geterror(a->encode)]);
- return 0;
- }
- thisext->which = ODR_EXTERNAL_single;
- thisext->u.single_ASN1_type = single;
- single->buf = (unsigned char*)odr_getbuf(a->encode, &single->len,
- &single->size);
- /* Now restore the encoding stream */
- odr_setbuf(a->encode, remember, s_remember, 1);
- logf(LOG_DEBUG, " Format is SUTRS. len %d, encoded len %d",
- fres->len, single->len);
-#endif