Fixed some negligences.
authorSebastian Hammer <quinn@indexdata.com>
Mon, 5 Jun 1995 10:52:05 +0000 (10:52 +0000)
committerSebastian Hammer <quinn@indexdata.com>
Mon, 5 Jun 1995 10:52:05 +0000 (10:52 +0000)
asn/prt-acc.c
asn/zget.c

index 93ca152..9032c85 100644 (file)
@@ -4,7 +4,10 @@
  * Sebastian Hammer, Adam Dickmeiss
  *
  * $Log: prt-acc.c,v $
- * Revision 1.1  1995-06-02 09:49:15  quinn
+ * Revision 1.2  1995-06-05 10:52:05  quinn
+ * Fixed some negligences.
+ *
+ * Revision 1.1  1995/06/02  09:49:15  quinn
  * Adding access control
  *
  *
@@ -48,6 +51,8 @@ int z_PromptId1(ODR o, Z_PromptId1 **p, int opt)
 
     if (o->direction == ODR_DECODE)
        *p = odr_malloc(o, sizeof(**p));
+    else if (!*p)
+       return opt;
     if (odr_choice(o, arm, &(*p)->u, &(*p)->which))
        return 1;
     *p = 0;
@@ -67,6 +72,8 @@ int z_PromptInfo1(ODR o, Z_PromptInfo1 **p, int opt)
 
     if (o->direction == ODR_DECODE)
        *p = odr_malloc(o, sizeof(**p));
+    else if (!*p)
+       return opt;
     if (odr_choice(o, arm, &(*p)->u, &(*p)->which))
        return 1;
     *p = 0;
@@ -96,6 +103,8 @@ int z_Challenge1(ODR o, Z_Challenge1 **p, int opt)
 {
     if (o->direction == ODR_ENCODE)
        *p = odr_malloc(o, sizeof(**p));
+    else if (!*p)
+       return opt;
     if (odr_sequence_of(o, z_ChallengeUnit1, &(*p)->list,
        &(*p)->num_challenges))
        return 1;
@@ -131,6 +140,8 @@ int z_Response1(ODR o, Z_Response1 **p, int opt)
 {
     if (o->direction == ODR_ENCODE)
        *p = odr_malloc(o, sizeof(**p));
+    else if (!*p)
+       return opt;
     if (odr_sequence_of(o, z_ResponseUnit1, &(*p)->list,
        &(*p)->num_responses))
        return 1;
@@ -149,6 +160,8 @@ int z_PromptObject1(ODR o, Z_PromptObject1 **p, int opt)
 
     if (o->direction == ODR_DECODE)
        *p = odr_malloc(o, sizeof(**p));
+    else if (!*p)
+       return opt;
     if (odr_choice(o, arm, &(*p)->u, &(*p)->which))
        return 1;
     *p = 0;
index 63c4b95..4d58e17 100644 (file)
@@ -4,7 +4,10 @@
  * Sebastian Hammer, Adam Dickmeiss
  *
  * $Log: zget.c,v $
- * Revision 1.2  1995-05-30 10:15:49  quinn
+ * Revision 1.3  1995-06-05 10:52:06  quinn
+ * Fixed some negligences.
+ *
+ * Revision 1.2  1995/05/30  10:15:49  quinn
  * Added our implementor's ID
  *
  * Revision 1.1  1995/05/22  11:30:20  quinn
@@ -50,8 +53,10 @@ Z_InitResponse *zget_InitResponse(ODR o)
     *r->preferredMessageSize = 30*1024;
     r->maximumRecordSize = odr_malloc(o, sizeof(int));
     *r->maximumRecordSize = 30*1024;
-    r->implementationId = "YAZ";
-    r->implementationName = "Index Data YAZ Z39.50/SR implementation";
+    r->result = odr_malloc(o, sizeof(bool_t));
+    *r->result = 1;
+    r->implementationId = "YAZ (id=81)";
+    r->implementationName = "Index Data/YAZ";
     r->implementationVersion = YAZ_VERSION;
     r->userInformationField = 0;
     return r;