# HG changeset patch # User Eric Warmenhoven # Date 964203721 0 # Node ID dd4d415dbe5209a252a2325dea879ff8b4211f7f # Parent ee4e188685846ae527e50eb8646e06bb152dc550 [gaim-migrate @ 527] Should announce direct connect when finally connected committer: Tailor Script diff -r ee4e18868584 -r dd4d415dbe52 src/oscar.c --- a/src/oscar.c Fri Jul 21 18:08:00 2000 +0000 +++ b/src/oscar.c Fri Jul 21 18:22:01 2000 +0000 @@ -926,6 +926,7 @@ struct aim_directim_priv *priv; struct aim_conn_t *newconn; struct conversation *cnv; + int watcher; va_start(ap, command); newconn = va_arg(ap, struct aim_conn_t *); @@ -937,10 +938,10 @@ debug_print(debug_buff); cnv = find_conversation(priv->sn); - cnv->conn = newconn; gdk_input_remove(cnv->watcher); - cnv->watcher = gdk_input_add(newconn->fd, GDK_INPUT_READ | GDK_INPUT_EXCEPTION, + watcher = gdk_input_add(newconn->fd, GDK_INPUT_READ | GDK_INPUT_EXCEPTION, oscar_callback, newconn); + make_direct(cnv, TRUE, newconn, watcher); aim_conn_addhandler(sess, newconn, AIM_CB_FAM_OFT, AIM_CB_OFT_DIRECTIMINCOMING, gaim_directim_incoming, 0); aim_conn_addhandler(sess, newconn, AIM_CB_FAM_OFT, AIM_CB_OFT_DIRECTIMTYPING, gaim_directim_typing, 0); @@ -966,7 +967,7 @@ void oscar_do_directim(char *name) { struct aim_conn_t *newconn = aim_directim_initiate(gaim_sess, gaim_conn, NULL, name); struct conversation *cnv = find_conversation(name); /* this will never be null because it just got set up */ - int watcher = gdk_input_add(newconn->fd, GDK_INPUT_READ | GDK_INPUT_EXCEPTION, oscar_callback, newconn); - make_direct(cnv, TRUE, newconn, watcher); + cnv->conn = newconn; + cnv->watcher = gdk_input_add(newconn->fd, GDK_INPUT_READ | GDK_INPUT_EXCEPTION, oscar_callback, newconn); aim_conn_addhandler(gaim_sess, newconn, AIM_CB_FAM_OFT, AIM_CB_OFT_DIRECTIMINITIATE, gaim_directim_initiate, 0); }