LICENSE file in egate root.
[egate.git] / zlayer / zaccess-yaz.c
index 31ef242..b64eedb 100644 (file)
@@ -4,7 +4,19 @@
  * Z39.50 API for the Email gateway - YAZ version
  *
  * $Log: zaccess-yaz.c,v $
- * Revision 1.5  1995/04/20 15:25:32  quinn
+ * Revision 1.9  1995/05/03 10:15:43  quinn
+ * Fixed bug in the get_record loop - crashed when diagrec was received.
+ *
+ * Revision 1.8  1995/04/28  14:18:38  quinn
+ * *** empty log message ***
+ *
+ * Revision 1.7  1995/04/21  16:29:32  quinn
+ * Fixed bugs.
+ *
+ * Revision 1.6  1995/04/21  12:58:36  adam
+ * Bug fix.
+ *
+ * Revision 1.5  1995/04/20  15:25:32  quinn
  * Asynch. API
  *
  * Revision 1.4  1995/04/19  16:02:28  adam
@@ -138,7 +150,6 @@ static int send_initreq(struct zass *p, char *auth)
     }
     else
        init.idAuthentication = 0;
-    init.idAuthentication = 0;
     init.implementationId = ZASS_ID;
     sprintf(name, "%s (YAZ protocol layer)", ZASS_NAME);
     init.implementationName = name;
@@ -295,7 +306,7 @@ static Z_RPNStructure *rpn2rpn(ODR o, struct ccl_rpn_node *q)
            r->u.simple = odr_malloc(o, sizeof(Z_Operand));
            r->u.simple->which = Z_Operand_resultSetId;
            r->u.simple->u.resultSetId = odr_malloc(o, len =
-               strlen(q->u.setname));
+               strlen(q->u.setname) + 1);
            memcpy(r->u.simple->u.resultSetId, q->u.setname, len);
            return r;
        case CCL_RPN_AND: case CCL_RPN_OR: case CCL_RPN_NOT:
@@ -502,8 +513,8 @@ void get_responserecords(zass_record ***p, Z_NamePlusRecordList *recs)
                gw_log(ZASS_DEBUG, ZASS_TYPE, "Got a record of %d bytes",
                    r->u.octet_aligned->len);
            }
+           (*p) = &(**p)->next;
        }
-       (*p) = &(**p)->next;
     }
 }