From 90524360eb192be01e1487bd45956fe0abc3b4f9 Mon Sep 17 00:00:00 2001 From: Christian Pointner Date: Thu, 10 Sep 2009 08:59:25 +0000 Subject: [PATCH] ignoring \r from firmware when existing --- door_daemon/door_daemon.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/door_daemon/door_daemon.c b/door_daemon/door_daemon.c index 6d43007..0f60c30 100644 --- a/door_daemon/door_daemon.c +++ b/door_daemon/door_daemon.c @@ -288,6 +288,9 @@ int process_door(read_buffer_t* buffer, int door_fd, cmd_t **cmd_q, client_t* cl if(buffer->buf[buffer->offset] == '\n') { buffer->buf[buffer->offset] = 0; + if(buffer->offset > 0 && buffer->buf[buffer->offset-1] == '\r') + buffer->buf[buffer->offset-1] = 0; + log_printf(NOTICE, "door-firmware: %s", buffer->buf); int cmd_fd = -1; -- 1.7.10.4