From a09f95df603d8cc1f140f39a6692c2da881dc685 Mon Sep 17 00:00:00 2001 From: Pascal Brisset Date: Thu, 24 Aug 2006 14:57:08 +0000 Subject: [PATCH] read-write open for non-/dev devices (pipes) --- sw/ground_segment/tmtc/link.ml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sw/ground_segment/tmtc/link.ml b/sw/ground_segment/tmtc/link.ml index 4407e05010..86222e9e0e 100644 --- a/sw/ground_segment/tmtc/link.ml +++ b/sw/ground_segment/tmtc/link.ml @@ -543,7 +543,7 @@ let _ = if on_serial_device then Serial.opendev !port (Serial.speed_of_baudrate !baurate) else - Unix.descr_of_in_channel (open_in !port) + Unix.openfile !port [Unix.O_RDWR] 0o640 in if !dtr then @@ -589,7 +589,7 @@ let _ = ignore (Glib.Timeout.add PprzModem.msg_period (fun () -> PprzModem.send_msg (); true)) | Wavecard -> Wc.init device !rssi_id - | XBee when on_serial_device -> (* Else on a pipe *) + | XBee -> XB.init device | _ -> () end;