Various minor text tweaks.
[yaz-moved-to-github.git] / src / seshigh.c
index 6e18d01..a9e248e 100644 (file)
@@ -469,7 +469,8 @@ void ir_session(IOCHAN h, int event)
     }
     if (event & EVENT_EXCEPT)
     {
-        yaz_log(YLOG_WARN, "ir_session (exception)");
+        if (assoc->state != ASSOC_DEAD)
+            yaz_log(YLOG_WARN, "ir_session (exception)");
         cs_close(conn);
         destroy_association(assoc);
         iochan_destroy(h);
@@ -2498,7 +2499,8 @@ static Z_Records *pack_records(association *a, char *setname, Odr_int start,
                                Z_ReferenceId *referenceId,
                                Odr_oid *oid, int *errcode)
 {
-    int recno, dumped_records = 0;
+    int recno;
+    Odr_int dumped_records = 0;
     int toget = odr_int_to_int(*num);
     Z_Records *records =
         (Z_Records *) odr_malloc(a->encode, sizeof(*records));
@@ -2591,7 +2593,7 @@ static Z_Records *pack_records(association *a, char *setname, Odr_int start,
         else
             this_length = odr_total(a->encode) - total_length - dumped_records;
         yaz_log(log_requestdetail, "  fetched record, len=" ODR_INT_PRINTF
-                " total=" ODR_INT_PRINTF " dumped=%d",
+                " total=" ODR_INT_PRINTF " dumped=" ODR_INT_PRINTF,
                 this_length, total_length, dumped_records);
         if (a->preferredMessageSize > 0 &&
             this_length + total_length > a->preferredMessageSize)