*** empty log message ***
[yaz-moved-to-github.git] / server / seshigh.c
index 6811402..c1d5350 100644 (file)
@@ -4,7 +4,13 @@
  * Sebastian Hammer, Adam Dickmeiss
  *
  * $Log: seshigh.c,v $
- * Revision 1.35  1995-06-15 07:45:14  quinn
+ * Revision 1.37  1995-06-16 13:16:14  quinn
+ * Fixed Defaultdiagformat.
+ *
+ * Revision 1.36  1995/06/16  10:31:36  quinn
+ * Added session timeout.
+ *
+ * Revision 1.35  1995/06/15  07:45:14  quinn
  * Moving to v3.
  *
  * Revision 1.34  1995/06/14  15:26:46  quinn
@@ -277,6 +283,14 @@ void ir_session(IOCHAN h, int event)
     request *req;
 
     assert(h && conn && assoc);
+    if (event == EVENT_TIMEOUT)
+    {
+       logf(LOG_LOG, "Timeout - closing connection.");
+       cs_close(conn);
+       destroy_association(assoc);
+       iochan_destroy(h);
+       return;
+    }
     if (event & EVENT_INPUT || event & EVENT_WORK) /* input */
     {
        if (event & EVENT_INPUT)
@@ -609,6 +623,7 @@ static Z_Records *diagrec(oid_proto proto, int error, char *addinfo)
 #endif
     dr.diagnosticSetId = oid_getoidbyent(&bib1);
     dr.condition = &err;
+    dr.which = Z_DiagForm_v2AddInfo;
     dr.addinfo = addinfo ? addinfo : "";
     return &rec;
 }
@@ -646,6 +661,7 @@ static Z_NamePlusRecord *surrogatediagrec(oid_proto proto, char *dbname,
 #endif
     dr.diagnosticSetId = oid_getoidbyent(&bib1);
     dr.condition = &err;
+    dr.which = Z_DiagForm_v2AddInfo;
     dr.addinfo = addinfo ? addinfo : "";
     return &rec;
 }
@@ -682,6 +698,7 @@ static Z_DiagRecs *diagrecs(oid_proto proto, int error, char *addinfo)
 #endif
     rec.diagnosticSetId = oid_getoidbyent(&bib1);
     rec.condition = &err;
+    rec.which = Z_DiagForm_v2AddInfo;
     rec.addinfo = addinfo ? addinfo : "";
     return &recs;
 }