X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=apps%2Fclients.c;h=598121e5ffaf2405d410588b49591a73955b7d8e;hb=82aed0c41cd917fdf9cdb20db788fe9da0662eba;hp=cd7bcee8d7593829a1fef8beacfb6c34cc9eea4e;hpb=cd414751eb1367ac4d0da57630785fed7389d982;p=sympathy.git diff --git a/apps/clients.c b/apps/clients.c index cd7bcee..598121e 100644 --- a/apps/clients.c +++ b/apps/clients.c @@ -10,6 +10,27 @@ static char rcsid[] = "$Id$"; /* * $Log$ + * Revision 1.11 2008/02/23 11:48:51 james + * *** empty log message *** + * + * Revision 1.10 2008/02/22 17:06:59 james + * *** empty log message *** + * + * Revision 1.9 2008/02/20 18:49:11 staffcvs + * *** empty log message *** + * + * Revision 1.8 2008/02/20 18:31:44 james + * *** empty log message *** + * + * Revision 1.7 2008/02/15 23:52:12 james + * *** empty log message *** + * + * Revision 1.6 2008/02/15 03:32:07 james + * *** empty log message *** + * + * Revision 1.5 2008/02/14 10:34:47 james + * *** empty log message *** + * * Revision 1.4 2008/02/14 10:34:30 james * *** empty log message *** * @@ -25,6 +46,11 @@ static char rcsid[] = "$Id$"; */ #include +#include +#include +#include +#include +#include #include "clients.h" static void @@ -41,6 +67,24 @@ client_msg (IPC_Msg * m, Context * c) case IPC_MSG_TYPE_KEY: vt102_send (c, m->key.key); break; + case IPC_MSG_TYPE_SETBAUD: + tty_set_baud (c->t, m->setbaud.baud); + tty_parse_reset (c); + + log_f (c->l, "", m->setbaud.baud); + break; + case IPC_MSG_TYPE_SENDBREAK: + tty_send_break (c->t); + break; + case IPC_MSG_TYPE_SETFLOW: + tty_set_flow (c->t, m->setflow.flow); + break; + case IPC_MSG_TYPE_SETANSI: + vt102_set_ansi (c->v, m->setansi.ansi); + break; + case IPC_MSG_TYPE_HANGUP: + tty_hangup (c->t); + break; default: fprintf (stderr, "Unhandeled message type %d\n", m->hdr.type); } @@ -53,7 +97,9 @@ client_free (Client * c) socket_free (c->s); free (c); +#if 0 fprintf (stderr, "Client at %p freed\n", c); +#endif } Client * @@ -70,7 +116,9 @@ clients_new_client (Clients * cs, Socket * s, Context * ctx) cs->head = c; cs->n++; +#if 0 fprintf (stderr, "Client at %p created\n", c); +#endif if (ipc_msg_send_debug (s, "new_client")) @@ -180,8 +228,9 @@ send_status (Clients * cs, char *msg) Client *c; - if (!msg) return; - len=strlen(msg)+1; + if (!msg) + return; + len = strlen (msg) + 1; if (!len) return; @@ -190,8 +239,8 @@ send_status (Clients * cs, char *msg) m->size = len + sizeof (IPC_Msg_status); m->type = IPC_MSG_TYPE_STATUS; - strncpy(m->status,msg, IPC_MAX_BUF); - m->status[IPC_MAX_BUF-1]=0; + strncpy (m->status, msg, IPC_MAX_BUF); + m->status[IPC_MAX_BUF - 1] = 0; for (c = cs->head; c; c = c->next) { @@ -262,5 +311,3 @@ send_vt102 (VT102 * v, Client * c) c->dead++; } - -