comparison src/connection.c @ 5622:70ae81fc802f

[gaim-migrate @ 6029] Fixed one bug.. we don't really want a disconnected connection in the list. committer: Tailor Script <tailor@pidgin.im>
author Christian Hammond <chipx86@chipx86.com>
date Sun, 01 Jun 2003 01:42:09 +0000
parents 6500a6c8d679
children 8c895d80159a
comparison
equal deleted inserted replaced
5621:f291874c418e 5622:70ae81fc802f
63 g_free(gc->away); 63 g_free(gc->away);
64 64
65 if (gc->away_state != NULL) 65 if (gc->away_state != NULL)
66 g_free(gc->away_state); 66 g_free(gc->away_state);
67 67
68 connections = g_list_remove(connections, gc);
69
70 g_free(gc); 68 g_free(gc);
71 } 69 }
72 70
73 void 71 void
74 gaim_connection_connect(GaimConnection *gc) 72 gaim_connection_connect(GaimConnection *gc)
117 115
118 serv_close(gc); 116 serv_close(gc);
119 117
120 gaim_connection_set_state(gc, GAIM_DISCONNECTED); 118 gaim_connection_set_state(gc, GAIM_DISCONNECTED);
121 119
120 connections = g_list_remove(connections, gc);
121
122 gaim_event_broadcast(event_signoff, gc); 122 gaim_event_broadcast(event_signoff, gc);
123 system_log(log_signoff, gc, NULL, OPT_LOG_BUDDY_SIGNON | OPT_LOG_MY_SIGNON); 123 system_log(log_signoff, gc, NULL, OPT_LOG_BUDDY_SIGNON | OPT_LOG_MY_SIGNON);
124
125 /* XXX Evil UI stuff!! */
126 do_away_menu();
127 do_proto_menu();
128 124
129 /* 125 /*
130 * XXX This is a hack! Remove this and replace it with a better event 126 * XXX This is a hack! Remove this and replace it with a better event
131 * notification system. 127 * notification system.
132 */ 128 */
138 134
139 gaim_request_close_with_handle(gc); 135 gaim_request_close_with_handle(gc);
140 gaim_notify_close_with_handle(gc); 136 gaim_notify_close_with_handle(gc);
141 137
142 update_privacy_connections(); 138 update_privacy_connections();
139
140 gaim_connection_destroy(gc);
143 141
144 /* XXX More UI stuff! */ 142 /* XXX More UI stuff! */
145 if (connections != NULL) 143 if (connections != NULL)
146 return; 144 return;
147 145