diff libfaim/aim_logoff.c @ 2:68b230f8da5f

[gaim-migrate @ 11] A few more commits :) committer: Tailor Script <tailor@pidgin.im>
author Rob Flynn <gaim@robflynn.com>
date Thu, 23 Mar 2000 03:16:06 +0000
parents
children 6ced2f1c8b24
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/libfaim/aim_logoff.c	Thu Mar 23 03:16:06 2000 +0000
@@ -0,0 +1,28 @@
+/*
+ * aim_logoff.c
+ *
+ *
+ */
+
+#include "aim.h"
+
+/* 
+ * aim_logoff()
+ * 
+ * Closes -ALL- open connections.
+ *
+ */
+int aim_logoff(void)
+{
+  int i = AIM_CONN_MAX-1;
+  while (i > -1)
+    {
+      if (aim_conns[i].fd>-1)
+	aim_conn_close(&(aim_conns[i]));
+      i--;
+    }
+  aim_connrst();  /* in case we want to connect again */
+
+  return 0;
+
+}