From f29b5afe645b99efc6346769a7a4a23f6e8fc644 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Sat, 23 May 2015 11:24:18 +0200 Subject: [PATCH] checking error --- src/algorithms/PVT/libs/nmea_printer.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/algorithms/PVT/libs/nmea_printer.cc b/src/algorithms/PVT/libs/nmea_printer.cc index 617e61438..1274a9e24 100644 --- a/src/algorithms/PVT/libs/nmea_printer.cc +++ b/src/algorithms/PVT/libs/nmea_printer.cc @@ -101,7 +101,7 @@ int Nmea_Printer::init_serial (std::string serial_device) fd = open(serial_device.c_str(), O_RDWR | O_NOCTTY | O_NDELAY); if (fd == -1) return fd; //failed to open TTY port - fcntl(fd, F_SETFL, 0); // clear all flags on descriptor, enable direct I/O + if(fcntl(fd, F_SETFL, 0) == -1) LOG(INFO) << "Error enabling direct I/O"; // clear all flags on descriptor, enable direct I/O tcgetattr(fd, &options); // read serial port options BAUD = B9600;