aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--apps/sympathyd.c12
-rw-r--r--src/ptty.c4
-rw-r--r--src/terminal.c6
-rw-r--r--src/tty.h5
4 files changed, 26 insertions, 1 deletions
diff --git a/apps/sympathyd.c b/apps/sympathyd.c
index 352b6a9..41a39f2 100644
--- a/apps/sympathyd.c
+++ b/apps/sympathyd.c
@@ -11,6 +11,9 @@ static char rcsid[] =
/*
* $Log$
+ * Revision 1.10 2008/02/14 10:39:14 james
+ * *** empty log message ***
+ *
* Revision 1.9 2008/02/14 10:34:47 james
* *** empty log message ***
*
@@ -53,6 +56,7 @@ typedef struct
int baud;
int crtscts;
int cd_edge_sec;
+ int blocked;
int bootstrap;
} Status;
@@ -74,6 +78,7 @@ get_status (TTY * t, Clients * cs)
status.lines = tty_status.lines;
status.baud = tty_status.baud;
status.crtscts = (tty_status.termios.c_cflag & CRTSCTS) ? 1 : 0;
+ status.blocked=tty_status.blocked;
cd = (tty_status.lines & TIOCM_CD) ? 1 : 0;
@@ -224,6 +229,13 @@ check_status (Context * c, Clients * cs)
ptr = do_line (ptr, status.lines, TIOCM_DSR);
ptr = do_line (ptr, status.lines, TIOCM_RI);
+ if (status.blocked)
+ {
+ t = ", Locked";
+ while (*t)
+ *(ptr++) = *(t++);
+ }
+
if (status.crtscts)
{
t = ", Flow";
diff --git a/src/ptty.c b/src/ptty.c
index c0f85f5..63d1e44 100644
--- a/src/ptty.c
+++ b/src/ptty.c
@@ -10,6 +10,9 @@ static char rcsid[] = "$Id$";
/*
* $Log$
+ * Revision 1.4 2008/02/14 10:39:14 james
+ * *** empty log message ***
+ *
* Revision 1.3 2008/02/13 09:12:21 james
* *** empty log message ***
*
@@ -164,6 +167,7 @@ ptty_open (char *path, char *argv[])
t->wfd = t->fd;
t->size.x = winsize.ws_row;
t->size.y = winsize.ws_col;
+ t->blocked = 0;
return (TTY *) t;
}
diff --git a/src/terminal.c b/src/terminal.c
index 03b688a..ab048fd 100644
--- a/src/terminal.c
+++ b/src/terminal.c
@@ -10,6 +10,9 @@ static char rcsid[] = "$Id$";
/*
* $Log$
+ * Revision 1.8 2008/02/14 10:39:14 james
+ * *** empty log message ***
+ *
* Revision 1.7 2008/02/14 01:55:57 james
* *** empty log message ***
*
@@ -244,11 +247,11 @@ terminal_open (int rfd, int wfd)
{
TERMINAL *t;
pid_t child;
- char name[1024];
struct termios termios;
t = (TERMINAL *) malloc (sizeof (TERMINAL));
+ strcpy(t->name,"terminal");
t->rfd = rfd;
t->wfd = wfd;
@@ -271,6 +274,7 @@ terminal_open (int rfd, int wfd)
t->recv = terminal_read;
t->xmit = terminal_write;
t->close = terminal_close;
+ t->blocked = 0;
terminal_getsize ((TTY *) t);
diff --git a/src/tty.h b/src/tty.h
index 5286c28..9b73c9c 100644
--- a/src/tty.h
+++ b/src/tty.h
@@ -12,6 +12,9 @@
/*
* $Log$
+ * Revision 1.7 2008/02/14 10:36:18 james
+ * *** empty log message ***
+ *
* Revision 1.6 2008/02/14 10:34:30 james
* *** empty log message ***
*
@@ -37,6 +40,7 @@
#define TTY_SIGNATURE \
char name[1024]; \
+ int blocked; \
CRT_Pos size; \
void (*close)(struct TTY_struct *); \
int (*recv)(struct TTY_struct *,void *buf,int len); \
@@ -51,6 +55,7 @@ typedef struct TTY_struct
typedef struct {
int lines;
+ int blocked;
struct termios termios;
int baud;
} TTY_Status;