chiark / gitweb /
@@
[sympathy.git] / src / ansi.c
index 0fa9a96e9fca5ad4940c7255c0976c918fc2cc62..8d4d640e9b07460d4c76da33f62c70001b96cec2 100644 (file)
@@ -10,6 +10,12 @@ static char rcsid[] = "$Id$";
 
 /*
  * $Log$
+ * Revision 1.25  2008/02/20 19:44:37  james
+ * @@
+ *
+ * Revision 1.24  2008/02/20 19:36:06  james
+ * @@
+ *
  * Revision 1.23  2008/02/20 19:25:09  james
  * *** empty log message ***
  *
@@ -814,7 +820,7 @@ ansi_dispatch (ANSI * a, Context * c)
 
 
   if (!a->terminal)
-    return;
+    return 0;
 
   red = a->terminal->recv (a->terminal, buf, sizeof (buf));
   if (red <= 0)
@@ -852,6 +858,11 @@ ansi_update (ANSI * a, Context * c)
 
 static void ansi_free(ANSI *a)
 {
+      a->terminal_reset(a);
+      if (a->terminal) 
+       a->terminal->close(a->terminal);
+
+       free(a);
 
 }