From: Christian Pointner Date: Thu, 10 Sep 2009 08:59:25 +0000 (+0000) Subject: ignoring \r from firmware when existing X-Git-Url: https://git.realraum.at/?a=commitdiff_plain;h=90524360eb192be01e1487bd45956fe0abc3b4f9;p=svn42.git ignoring \r from firmware when existing --- 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;