chiark / gitweb /
*** empty log message ***
[sympathy.git] / apps / clients.c
index 40713a9db057d1f77172e725f4005a619a03c90e..d5bd256cb7b4846bf9d31d7bee348aad1072bbec 100644 (file)
@@ -10,6 +10,33 @@ static char rcsid[] = "$Id$";
 
 /*
  * $Log$
+ * Revision 1.14  2008/02/28 16:57:51  james
+ * *** empty log message ***
+ *
+ * Revision 1.13  2008/02/28 16:37:16  james
+ * *** empty log message ***
+ *
+ * Revision 1.12  2008/02/28 12:12:24  james
+ * *** empty log message ***
+ *
+ * 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 ***
  *
@@ -28,9 +55,14 @@ static char rcsid[] = "$Id$";
  */
 
 #include <sympathy.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <strings.h>
+#include <malloc.h>
 #include "clients.h"
 
-static void
+void
 client_msg (IPC_Msg * m, Context * c)
 {
   switch (m->hdr.type)
@@ -44,6 +76,30 @@ 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, "<baud changed to %d>", 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;
+    case IPC_MSG_TYPE_SETSIZE:
+      vt102_resize (c, m->setsize.winsize);
+      break;
+    case IPC_MSG_TYPE_RESET:
+      vt102_reset (c);
+      break;
     default:
       fprintf (stderr, "Unhandeled message type %d\n", m->hdr.type);
     }
@@ -56,7 +112,9 @@ client_free (Client * c)
     socket_free (c->s);
 
   free (c);
+#if 0
   fprintf (stderr, "Client at %p freed\n", c);
+#endif
 }
 
 Client *
@@ -73,7 +131,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"))