From 20dcc4f56ee1aef779a89a2c2ea199fdac458092 Mon Sep 17 00:00:00 2001 From: Sebastien Helleu Date: Sun, 3 Apr 2005 17:12:12 +0000 Subject: [PATCH] Fixed crash when purging old DCC --- ChangeLog | 3 ++- TODO | 15 ++++++--------- src/gui/curses/gui-input.c | 7 +++++-- weechat/ChangeLog | 3 ++- weechat/TODO | 15 ++++++--------- weechat/src/gui/curses/gui-input.c | 7 +++++-- 6 files changed, 26 insertions(+), 24 deletions(-) diff --git a/ChangeLog b/ChangeLog index 6e95e6749..6fb0e503c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,10 +1,11 @@ WeeChat - Wee Enhanced Environment for Chat =========================================== -ChangeLog - 2005-03-24 +ChangeLog - 2005-04-03 Version 0.1.2 (under dev!): + * fixed crash when purging old DCC * fixed crash with 64-bits arch (like AMD64) when converting UTF-8 * added missing IRC commands (307) diff --git a/TODO b/TODO index 1435ae0ae..aaae35cba 100644 --- a/TODO +++ b/TODO @@ -1,7 +1,7 @@ WeeChat - Wee Enhanced Environment for Chat =========================================== -TODO - 2005-03-20 +TODO - 2005-04-03 Legend: # done @@ -10,7 +10,7 @@ Legend: ? is this really necessary? -v0.1.1: +v0.1.2: ------ * General: @@ -19,8 +19,6 @@ v0.1.1: + *BSD version * IRC protocol: - # "/dcc send" command - # "/dcc chat" command (and incoming DCC chats) - customizable CTCP version reply * Interface: @@ -28,7 +26,10 @@ v0.1.1: + internationalization (traduce WeeChat in many languages) * TCP/IP communication: - # connect to server with child process (background) + - SSL support + + * Configuration: + - add key bindings to config file Future versions: @@ -64,7 +65,6 @@ Future versions: * TCP/IP communication: - proxy support - - SSL support - IPv6 protocol implementation * Plugins: @@ -72,6 +72,3 @@ Future versions: - "/python load" and "/python unload" commands to (un)load Python scripts - Ruby plugin - "/ruby load" and "/ruby unload" commands to (un)load Ruby scripts - - * Configuration: - - add key bindings to config file diff --git a/src/gui/curses/gui-input.c b/src/gui/curses/gui-input.c index ec8c8ba43..7d92ae8e7 100644 --- a/src/gui/curses/gui-input.c +++ b/src/gui/curses/gui-input.c @@ -53,7 +53,7 @@ gui_read_keyb () int key, i; t_gui_buffer *ptr_buffer; t_irc_server *ptr_server; - t_irc_dcc *ptr_dcc; + t_irc_dcc *ptr_dcc, *ptr_dcc_next; char new_char[3], *decoded_string; t_irc_dcc *dcc_selected; @@ -591,10 +591,13 @@ gui_read_keyb () case 'p': case 'P': gui_current_window->dcc_selected = NULL; - for (ptr_dcc = dcc_list; ptr_dcc; ptr_dcc = ptr_dcc->next_dcc) + ptr_dcc = dcc_list; + while (ptr_dcc) { + ptr_dcc_next = ptr_dcc->next_dcc; if (DCC_ENDED(ptr_dcc->status)) dcc_free (ptr_dcc); + ptr_dcc = ptr_dcc_next; } gui_redraw_buffer (gui_current_window->buffer); break; diff --git a/weechat/ChangeLog b/weechat/ChangeLog index 6e95e6749..6fb0e503c 100644 --- a/weechat/ChangeLog +++ b/weechat/ChangeLog @@ -1,10 +1,11 @@ WeeChat - Wee Enhanced Environment for Chat =========================================== -ChangeLog - 2005-03-24 +ChangeLog - 2005-04-03 Version 0.1.2 (under dev!): + * fixed crash when purging old DCC * fixed crash with 64-bits arch (like AMD64) when converting UTF-8 * added missing IRC commands (307) diff --git a/weechat/TODO b/weechat/TODO index 1435ae0ae..aaae35cba 100644 --- a/weechat/TODO +++ b/weechat/TODO @@ -1,7 +1,7 @@ WeeChat - Wee Enhanced Environment for Chat =========================================== -TODO - 2005-03-20 +TODO - 2005-04-03 Legend: # done @@ -10,7 +10,7 @@ Legend: ? is this really necessary? -v0.1.1: +v0.1.2: ------ * General: @@ -19,8 +19,6 @@ v0.1.1: + *BSD version * IRC protocol: - # "/dcc send" command - # "/dcc chat" command (and incoming DCC chats) - customizable CTCP version reply * Interface: @@ -28,7 +26,10 @@ v0.1.1: + internationalization (traduce WeeChat in many languages) * TCP/IP communication: - # connect to server with child process (background) + - SSL support + + * Configuration: + - add key bindings to config file Future versions: @@ -64,7 +65,6 @@ Future versions: * TCP/IP communication: - proxy support - - SSL support - IPv6 protocol implementation * Plugins: @@ -72,6 +72,3 @@ Future versions: - "/python load" and "/python unload" commands to (un)load Python scripts - Ruby plugin - "/ruby load" and "/ruby unload" commands to (un)load Ruby scripts - - * Configuration: - - add key bindings to config file diff --git a/weechat/src/gui/curses/gui-input.c b/weechat/src/gui/curses/gui-input.c index ec8c8ba43..7d92ae8e7 100644 --- a/weechat/src/gui/curses/gui-input.c +++ b/weechat/src/gui/curses/gui-input.c @@ -53,7 +53,7 @@ gui_read_keyb () int key, i; t_gui_buffer *ptr_buffer; t_irc_server *ptr_server; - t_irc_dcc *ptr_dcc; + t_irc_dcc *ptr_dcc, *ptr_dcc_next; char new_char[3], *decoded_string; t_irc_dcc *dcc_selected; @@ -591,10 +591,13 @@ gui_read_keyb () case 'p': case 'P': gui_current_window->dcc_selected = NULL; - for (ptr_dcc = dcc_list; ptr_dcc; ptr_dcc = ptr_dcc->next_dcc) + ptr_dcc = dcc_list; + while (ptr_dcc) { + ptr_dcc_next = ptr_dcc->next_dcc; if (DCC_ENDED(ptr_dcc->status)) dcc_free (ptr_dcc); + ptr_dcc = ptr_dcc_next; } gui_redraw_buffer (gui_current_window->buffer); break;