Take care of preferredMessageSize.
[yaz-moved-to-github.git] / asn / proto.c
index 60aba87..3b6cb0a 100644 (file)
@@ -4,7 +4,13 @@
  * Sebastian Hammer, Adam Dickmeiss
  *
  * $Log: proto.c,v $
- * Revision 1.7  1995-03-07 16:29:33  quinn
+ * Revision 1.9  1995-03-15 08:37:06  quinn
+ * Fixed protocol bugs.
+ *
+ * Revision 1.8  1995/03/14  16:59:24  quinn
+ * Fixed OPTIONAL flag in attributeelement
+ *
+ * Revision 1.7  1995/03/07  16:29:33  quinn
  * Added authentication stuff.
  *
  * Revision 1.6  1995/03/01  14:46:03  quinn
@@ -199,9 +205,9 @@ int z_AttributeElement(ODR o, Z_AttributeElement **p, int opt)
        return opt;
     return
        odr_implicit(o, odr_integer, &(*p)->attributeType, ODR_CONTEXT,
-           120, 1) &&
+           120, 0) &&
        odr_implicit(o, odr_integer, &(*p)->attributeValue, ODR_CONTEXT,
-           121, 1) &&
+           121, 0) &&
        odr_sequence_end(o);
 }
 
@@ -522,10 +528,8 @@ int z_APDU(ODR o, Z_APDU **p, int opt)
     if (!odr_choice(o, arm, &(*p)->u, &(*p)->which))
     {
        if (o->direction == ODR_DECODE)
-       {
            *p = 0;
-           return opt;
-       }
+       return opt;
     }
     return 1;
 }