]> git.mxchange.org Git - flightgear.git/commitdiff
only complain about binary record length mismatch if mode is binary.
authortorsten <torsten>
Thu, 17 Sep 2009 20:17:35 +0000 (20:17 +0000)
committerTim Moore <timoore@redhat.com>
Fri, 18 Sep 2009 08:38:34 +0000 (10:38 +0200)
src/Network/generic.cxx

index eb7911744c900fd5d21ef1ef87566530155d60ea..a91f7835eba45a8a2d56d5427b6d20eebfa509ee 100644 (file)
@@ -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;
+        }
     }
 }