// $Id$
-#include <Debug/logstream.hxx>
-#include <Math/fg_geodesy.hxx>
+#include <simgear/debug/logstream.hxx>
+#include <simgear/math/fg_geodesy.hxx>
+
#include <Time/fg_time.hxx>
#include "iochannel.hxx"
return false;
}
} else if ( get_direction() == in ) {
- while ( io->read( (char *)(& buf), length ) == length ) {
- FG_LOG( FG_IO, FG_ALERT, "Success reading data." );
- *cur_fdm_state = buf;
+ if ( io->get_type() == fgFileType ) {
+ if ( io->read( (char *)(& buf), length ) == length ) {
+ FG_LOG( FG_IO, FG_ALERT, "Success reading data." );
+ *cur_fdm_state = buf;
+ }
+ } else {
+ while ( io->read( (char *)(& buf), length ) == length ) {
+ FG_LOG( FG_IO, FG_ALERT, "Success reading data." );
+ *cur_fdm_state = buf;
+ }
}
}