* See the file LICENSE for details.
* Sebastian Hammer, Adam Dickmeiss
*
- * $Id: ber_tag.c,v 1.25 2003-03-11 11:03:31 adam Exp $
+ * $Id: ber_tag.c,v 1.27 2003-05-24 19:20:14 adam Exp $
*/
#if HAVE_CONFIG_H
#include <config.h>
*
* Should perhaps be odr_tag?
*/
-int ber_tag(ODR o, void *p, int zclass, int tag, int *constructed, int opt)
+int ber_tag(ODR o, void *p, int zclass, int tag, int *constructed, int opt,
+ const char *name)
{
struct Odr_ber_tag *odr_ber_tag = &o->op->odr_ber_tag;
int rd;
if (!*pp)
{
if (!opt)
+ {
odr_seterror(o, OREQUIRED, 24);
+ odr_setelement (o, name);
+ }
return 0;
}
if ((rd = ber_enctag(o, zclass, tag, *constructed)) < 0)
if (o->op->stackp > -1 && !odr_constructed_more(o))
{
if (!opt)
+ {
odr_seterror(o, OREQUIRED, 25);
+ odr_setelement(o, name);
+ }
return 0;
}
if (odr_ber_tag->lclass < 0)
odr_max(o))) <= 0)
{
odr_seterror(o, OPROTO, 26);
+ odr_setelement(o, name);
return 0;
}
#ifdef ODR_DEBUG
else
{
if (!opt)
+ {
odr_seterror(o, OREQUIRED, 27);
+ odr_setelement(o, name);
+ }
return 0;
}
case ODR_PRINT:
if (!*pp && !opt)
+ {
odr_seterror(o,OREQUIRED, 28);
+ odr_setelement(o, name);
+ }
return *pp != 0;
default:
odr_seterror(o, OOTHER, 29);
+ odr_setelement(o, name);
return 0;
}
}