summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan McGee <dpmcgee@gmail.com>2010-10-23 01:45:52 -0500
committerDan McGee <dpmcgee@gmail.com>2011-01-21 16:04:09 -0600
commit56aa1adfd9c1ac715b76dab51a02ae09895b866f (patch)
tree0105f5670d980537ff9ef1fe07f3ff67fdd44500
parent466e4e6986160ee591ee0e2601b1fbacfd15e064 (diff)
downloadonkyocontrol-56aa1adfd9c1ac715b76dab51a02ae09895b866f.tar.gz
onkyocontrol-56aa1adfd9c1ac715b76dab51a02ae09895b866f.zip
Remove termios reset code
This doesn't fire half the time anyway if the program abruptly exits, and if you are using the serial port you should definitely be setting it up as you need and not depending on any preexisting configuration. Signed-off-by: Dan McGee <dpmcgee@gmail.com>
-rw-r--r--onkyo.c7
-rw-r--r--onkyo.h2
2 files changed, 0 insertions, 9 deletions
diff --git a/onkyo.c b/onkyo.c
index e26df20..14116d9 100644
--- a/onkyo.c
+++ b/onkyo.c
@@ -183,8 +183,6 @@ static void cleanup(int ret)
}
/* reset/close our receiver device */
if(rcvr->fd > -1) {
- /* just ignore possible errors here, can't do anything */
- tcsetattr(rcvr->fd, TCSANOW, &(rcvr->serial_oldtio));
xclose(rcvr->fd);
}
free(rcvr);
@@ -386,11 +384,6 @@ static int open_serial_device(const char *path)
if (rcvr->fd < 0)
goto cleanup;
- /* save current serial port settings */
- ret = tcgetattr(rcvr->fd, &rcvr->serial_oldtio);
- if (ret < 0)
- goto cleanup;
-
memset(&newtio, 0, sizeof(struct termios));
/* Set:
* B9600 - 9600 baud
diff --git a/onkyo.h b/onkyo.h
index 326b093..410318b 100644
--- a/onkyo.h
+++ b/onkyo.h
@@ -9,7 +9,6 @@
#include <sys/time.h> /* struct timeval */
#include <sys/types.h> /* ssize_t, size_t */
-#include <termios.h> /* struct termios */
/** The default port number to listen on (note: it is a string, not a num) */
#define LISTENPORT "8701"
@@ -60,7 +59,6 @@ struct receiver {
int type;
enum power power;
struct timeval last_cmd;
- struct termios serial_oldtio;
struct cmdqueue *queue;
struct receiver *next;
};