wrbuf_puts(w, " ");
}
+static int odr_int_to_int(Odr_int v)
+{
+ if (v >= INT_MAX)
+ return INT_MAX;
+ else if (v <= INT_MIN)
+ return INT_MIN;
+ else
+ return (int) v;
+}
+
/*
* Create and initialize a new association-handle.
* channel : iochannel for the current line.
return 0;
}
-static int odr_int_to_int(Odr_int v)
-{
- if (v >= INT_MAX)
- return INT_MAX;
- else if (v <= INT_MIN)
- return INT_MIN;
- else return v;
-}
-
static void srw_bend_search(association *assoc, request *req,
Z_SRW_PDU *sr,
Z_SRW_PDU *res,
yaz_log(log_requestdetail, "Negotiated to v%d: %s", assoc->version, options);
if (*req->maximumRecordSize < assoc->maximumRecordSize)
- assoc->maximumRecordSize = *req->maximumRecordSize;
+ assoc->maximumRecordSize = odr_int_to_int(*req->maximumRecordSize);
if (*req->preferredMessageSize < assoc->preferredMessageSize)
- assoc->preferredMessageSize = *req->preferredMessageSize;
+ assoc->preferredMessageSize = odr_int_to_int(*req->preferredMessageSize);
resp->preferredMessageSize =
odr_intdup(assoc->encode, assoc->preferredMessageSize);