aboutsummaryrefslogtreecommitdiffstats
path: root/src/serial.c
diff options
context:
space:
mode:
authorjames <>2008-02-15 23:52:12 +0000
committerjames <>2008-02-15 23:52:12 +0000
commit85a601f7fcaaa64d58567779236a4f3568c219ad (patch)
tree8f759603b660edb1ff7419cd10d4787f3a2fd33b /src/serial.c
parent15e84568cdefdddc2191d15156ab5e35d57b47be (diff)
downloadsympathy-85a601f7fcaaa64d58567779236a4f3568c219ad.tar.gz
sympathy-85a601f7fcaaa64d58567779236a4f3568c219ad.tar.bz2
sympathy-85a601f7fcaaa64d58567779236a4f3568c219ad.zip
*** empty log message ***
Diffstat (limited to 'src/serial.c')
-rw-r--r--src/serial.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/serial.c b/src/serial.c
index 2e67d3d..bd4450c 100644
--- a/src/serial.c
+++ b/src/serial.c
@@ -10,6 +10,9 @@ static char rcsid[] = "$Id$";
/*
* $Log$
+ * Revision 1.7 2008/02/15 23:52:12 james
+ * *** empty log message ***
+ *
* Revision 1.6 2008/02/15 19:51:30 james
* *** empty log message ***
*
@@ -79,6 +82,7 @@ serial_close (TTY * _t)
if (!t)
return;
+ tcflush (t->fd, TCIOFLUSH);
close (t->fd);
free (t);
}
@@ -116,7 +120,7 @@ serial_read (TTY * _t, void *buf, int len)
static int
-ptty_write (TTY * _t, void *buf, int len)
+serial_write (TTY * _t, void *buf, int len)
{
int writ, done = 0;
Serial *t = (Serial *) _t;
@@ -161,7 +165,7 @@ serial_open (char *path, int lock_mode)
default_termios (&termios);
- fd = open (path, O_RDWR);
+ fd = open (path, O_RDWR | O_NOCTTY | O_NONBLOCK);
set_nonblocking (fd);
@@ -173,7 +177,7 @@ serial_open (char *path, int lock_mode)
t->name[sizeof (t->name) - 1] = 0;
t->recv = serial_read;
- //t->xmit = serial_write;
+ t->xmit = serial_write;
t->close = serial_close;
t->fd = fd;
t->rfd = t->fd;
@@ -181,6 +185,7 @@ serial_open (char *path, int lock_mode)
t->size.x = VT102_COLS;
t->size.y = VT102_ROWS;
t->blocked = serial_lock_check (t->lock);
+ t->hanging_up = 0;
return (TTY *) t;
}