diff options
-rw-r--r-- | ChangeLog.adoc | 1 | ||||
-rw-r--r-- | src/plugins/xfer/xfer.c | 17 |
2 files changed, 13 insertions, 5 deletions
diff --git a/ChangeLog.adoc b/ChangeLog.adoc index 6213344bd..8329d301f 100644 --- a/ChangeLog.adoc +++ b/ChangeLog.adoc @@ -39,6 +39,7 @@ Bug fixes:: * scripts: fix issue with year ≥ 2038 in functions infolist_new_var_time, print_date_tags and print_y_date_tags (plugins: python/lua/tcl/guile/javascript) * scripts: fix issue with long interval in function hook_timer (plugins: python/ruby/lua/tcl/guile/javascript/php) * xfer: fix crash when closing DCC chat buffer + * xfer: disconnect all active DCC chats and files on `/upgrade` * xfer: fix refresh of xfer buffer after `/upgrade` Tests:: diff --git a/src/plugins/xfer/xfer.c b/src/plugins/xfer/xfer.c index b1c5690d8..7d14ba998 100644 --- a/src/plugins/xfer/xfer.c +++ b/src/plugins/xfer/xfer.c @@ -130,8 +130,13 @@ xfer_signal_upgrade_cb (const void *pointer, void *data, xfer_signal_upgrade_received = 1; - if (signal_data && (strcmp (signal_data, "quit") == 0)) - xfer_disconnect_all (); + /* + * TODO: do not disconnect here in case of upgrade when the save of xfers + * in upgrade file will be implemented + * (see function xfer_upgrade_save_xfers in xfer-upgrade.c) + */ + /*if (signal_data && (strcmp (signal_data, "quit") == 0))*/ + xfer_disconnect_all (); return WEECHAT_RC_OK; } @@ -418,7 +423,9 @@ xfer_disconnect_all () ptr_xfer->filename, ptr_xfer->remote_nick); } - xfer_close (ptr_xfer, XFER_STATUS_FAILED); + xfer_close (ptr_xfer, + (XFER_IS_CHAT(ptr_xfer->type)) ? + XFER_STATUS_ABORTED : XFER_STATUS_FAILED); } } } @@ -1922,8 +1929,8 @@ weechat_plugin_end (struct t_weechat_plugin *plugin) if (xfer_signal_upgrade_received) xfer_upgrade_save (); - else - xfer_disconnect_all (); + + xfer_disconnect_all (); xfer_free_all (); |