00001
00002
00003
00004
00005
00013 #if HAVE_CONFIG_H
00014 #include <config.h>
00015 #endif
00016
00017 #include "odr-priv.h"
00018
00022 int ber_null(ODR o)
00023 {
00024 switch (o->direction)
00025 {
00026 case ODR_ENCODE:
00027 if (odr_putc(o, 0X00) < 0)
00028 return 0;
00029 return 1;
00030 case ODR_DECODE:
00031 if (odr_max(o) < 1)
00032 {
00033 odr_seterror(o, OPROTO, 39);
00034 return 0;
00035 }
00036 if (*(o->bp++) != 0X00)
00037 {
00038 odr_seterror(o, OPROTO, 12);
00039 return 0;
00040 }
00041 return 1;
00042 case ODR_PRINT:
00043 return 1;
00044 default:
00045 odr_seterror(o, OOTHER, 13);
00046 return 0;
00047 }
00048 }
00049
00050
00051
00052
00053
00054
00055
00056