From fbe203993c6413eaf37cb2da60af515b1bab2ea2 Mon Sep 17 00:00:00 2001 From: Jef Driesen Date: Tue, 18 Jan 2011 11:53:47 +0100 Subject: [PATCH] Ignore timeouts during initialization. Some Veo devices never respond to the initialization command, but have no problem to continue the communication. Therefore a timeout with no data received is ignored. If there happens to be a real problem, it will be catched when sending one of the other commands afterwards. --- src/oceanic_veo250.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/oceanic_veo250.c b/src/oceanic_veo250.c index 259f0b2..663c782 100644 --- a/src/oceanic_veo250.c +++ b/src/oceanic_veo250.c @@ -179,6 +179,8 @@ oceanic_veo250_init (oceanic_veo250_device_t *device) n = serial_read (device->port, answer, sizeof (answer)); if (n != sizeof (answer)) { WARNING ("Failed to receive the answer."); + if (n == 0) + return DEVICE_STATUS_SUCCESS; return EXITCODE (n); }