aboutsummaryrefslogtreecommitdiffstats
path: root/irc.c
diff options
context:
space:
mode:
Diffstat (limited to 'irc.c')
-rw-r--r--irc.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/irc.c b/irc.c
index 8f79b535..eb4a395d 100644
--- a/irc.c
+++ b/irc.c
@@ -255,7 +255,12 @@ void irc_free(irc_t * irc)
query_del(irc, irc->queries);
while (irc->accounts)
- account_del(irc, irc->accounts);
+ if (irc->accounts->gc == NULL)
+ account_del(irc, irc->accounts);
+ else
+ /* Nasty hack, but account_del() doesn't work in this
+ case and we don't want infinite loops, do we? ;-) */
+ irc->accounts = irc->accounts->next;
while (irc->set)
set_del(&irc->set, irc->set->key);
@@ -584,8 +589,11 @@ void irc_vawrite( irc_t *irc, char *format, va_list params )
immediately. If it returns TRUE, it should be called again, so add the event to
the queue. If it's FALSE, we emptied the buffer and saved ourselves some work
in the event queue. */
- if( bitlbee_io_current_client_write( irc, irc->fd, GAIM_INPUT_WRITE ) )
- irc->w_watch_source_id = b_input_add( irc->fd, GAIM_INPUT_WRITE, bitlbee_io_current_client_write, irc );
+ /* Really can't be done as long as the code doesn't do error checking very well:
+ if( bitlbee_io_current_client_write( irc, irc->fd, GAIM_INPUT_WRITE ) ) */
+
+ /* So just always do it via the event handler. */
+ irc->w_watch_source_id = b_input_add( irc->fd, GAIM_INPUT_WRITE, bitlbee_io_current_client_write, irc );
}
return;