--- 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;