From 949981a6d72f1c797cef1faebd4c66ab825de697 Mon Sep 17 00:00:00 2001 From: torsten Date: Thu, 17 Sep 2009 20:17:35 +0000 Subject: [PATCH] only complain about binary record length mismatch if mode is binary. --- src/Network/generic.cxx | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/src/Network/generic.cxx b/src/Network/generic.cxx index eb7911744..a91f7835e 100644 --- a/src/Network/generic.cxx +++ b/src/Network/generic.cxx @@ -692,12 +692,14 @@ FGGeneric::read_config(SGPropertyNode *root, vector<_serial_prot> &msg) } - if (binary_record_length == -1) { - binary_record_length = record_length; - } else if (binary_record_length < record_length) { - SG_LOG(SG_IO, SG_ALERT, - "generic protocol: Requested binary record length shorter than " - " requested record representation."); - binary_record_length = record_length; + if( binary_mode ) { + if (binary_record_length == -1) { + binary_record_length = record_length; + } else if (binary_record_length < record_length) { + SG_LOG(SG_IO, SG_ALERT, + "generic protocol: Requested binary record length shorter than " + " requested record representation."); + binary_record_length = record_length; + } } }