changeset 807:632d781c29da

[gaim-migrate @ 817] ha! actually, this shouldn't do anything. i just think it's fun to print the same message over and over and over and over and over and over and over and over and over and over and over and over and over and over and over and over and over and over and over and over and over and over and over and over and over and over and over and over and over and over and over and over and over and over and over and over and over and over and over and over and over and over and over and over and over and over and over and over and over and over and over and over and over and over and over and over and over and over and over and over and over and over and over and over and over and over and over and over and over and over and over and over and over and over and over and over and over and over and over and over and over and over and over and over and over and over and over and over and over and over and over and over and over and over and over and over and over and over and over and over and over and over and over and over and over and over and over and over and over and over and over and over and over and over and over and over and over and over and over and over and over and over and over and over and over and over and over and over and over committer: Tailor Script <tailor@pidgin.im>
author Eric Warmenhoven <eric@warmenhoven.org>
date Thu, 31 Aug 2000 02:12:58 +0000
parents 67bdecdecbb7
children 9d61f3d01046
files src/oscar.c
diffstat 1 files changed, 12 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/oscar.c	Thu Aug 31 01:40:58 2000 +0000
+++ b/src/oscar.c	Thu Aug 31 02:12:58 2000 +0000
@@ -47,6 +47,7 @@
 static int inpa = -1;
 static int paspa = -1;
 static int cnpa = -1;
+static int keepalive = -1;
 struct aim_session_t *gaim_sess;
 struct aim_conn_t    *gaim_conn;
 int gaim_caps = AIM_CAPS_CHAT | AIM_CAPS_SENDFILE | AIM_CAPS_GETFILE |
@@ -229,6 +230,9 @@
 	if (inpa > 0)
 		gdk_input_remove(inpa);
 	inpa = -1;
+	if (keepalive > 0)
+		gtk_timeout_remove(keepalive);
+	keepalive = -1;
 	aim_logoff(gaim_sess);
 	g_free(gaim_sess);
 	debug_print(_("Signed off.\n"));
@@ -384,6 +388,12 @@
 	return 1;
 }
 
+static int oscar_keepalive(gpointer d) {
+	debug_print("oscar: sending nop (keepalive)\n");
+	aim_bos_nop(gaim_sess, gaim_conn);
+	return 1;
+}
+
 int gaim_handle_redirect(struct aim_session_t *sess,
 			 struct command_rx_struct *command, ...) {
 	va_list ap;
@@ -432,6 +442,8 @@
 		aim_bos_clientready(sess, command->conn);
 		debug_print("Roger that, all systems go\n");
 
+		keepalive = gtk_timeout_add(30000, (GtkFunction)oscar_keepalive, NULL);
+
 		aim_bos_reqservice(sess, command->conn, AIM_CONN_TYPE_CHATNAV);
 
 		break;