1
0
mirror of https://github.com/weechat/weechat.git synced 2026-06-26 21:06:38 +02:00

xfer: fix send of data on the DCC chat buffer after /upgrade if the buffer was opened before the upgrade (issue #2092)

This commit is contained in:
Sébastien Helleu
2024-05-31 08:11:55 +02:00
parent b615e6cee7
commit 7eb04b77fe
3 changed files with 21 additions and 3 deletions
+2 -1
View File
@@ -14,10 +14,11 @@
[[v4.3.1_fixed]]
=== Fixed
* core: fix detection of libgcrypt ≥ 1.11 (debian #1071960)
* irc: close /list buffer when the server buffer is closed (issue #2121)
* xfer: fix send of data on the DCC chat buffer after `/upgrade` if the buffer was opened before the upgrade (issue #2092)
* php: fix return value of function hdata_longlong
* tcl: fix return value of function hdata_longlong (issue #2119)
* core: fix detection of libgcrypt ≥ 1.11 (debian #1071960)
* core, relay: fix include directory of libcjson and libzstd
* tests: fix relay tests on s390x (issue #2118)
* tests: fix check of php plugin (issue #2117)
+5
View File
@@ -22,6 +22,11 @@
extern void xfer_chat_sendf (struct t_xfer *xfer, const char *format, ...);
extern int xfer_chat_recv_cb (const void *pointer, void *data, int fd);
extern int xfer_chat_buffer_input_cb (const void *pointer, void *data,
struct t_gui_buffer *buffer,
const char *input_data);
extern int xfer_chat_buffer_close_cb (const void *pointer, void *data,
struct t_gui_buffer *buffer);
extern void xfer_chat_open_buffer (struct t_xfer *xfer);
#endif /* WEECHAT_PLUGIN_XFER_CHAT_H */
+14 -2
View File
@@ -26,6 +26,7 @@
#include "xfer.h"
#include "xfer-upgrade.h"
#include "xfer-buffer.h"
#include "xfer-chat.h"
/*
@@ -80,6 +81,7 @@ xfer_upgrade_set_buffer_callbacks ()
{
struct t_infolist *infolist;
struct t_gui_buffer *ptr_buffer;
const char *type;
infolist = weechat_infolist_get ("buffer", NULL, NULL);
if (infolist)
@@ -89,12 +91,22 @@ xfer_upgrade_set_buffer_callbacks ()
if (weechat_infolist_pointer (infolist, "plugin") == weechat_xfer_plugin)
{
ptr_buffer = weechat_infolist_pointer (infolist, "pointer");
weechat_buffer_set_pointer (ptr_buffer, "close_callback", &xfer_buffer_close_cb);
weechat_buffer_set_pointer (ptr_buffer, "input_callback", &xfer_buffer_input_cb);
type = weechat_buffer_get_string (ptr_buffer, "localvar_type");
if (strcmp (weechat_infolist_string (infolist, "name"),
XFER_BUFFER_NAME) == 0)
{
xfer_buffer = ptr_buffer;
weechat_buffer_set_pointer (
ptr_buffer, "close_callback", &xfer_buffer_close_cb);
weechat_buffer_set_pointer (
ptr_buffer, "input_callback", &xfer_buffer_input_cb);
}
else if (type && (strcmp (type, "private") == 0))
{
weechat_buffer_set_pointer (
ptr_buffer, "close_callback", &xfer_chat_buffer_close_cb);
weechat_buffer_set_pointer (
ptr_buffer, "input_callback", &xfer_chat_buffer_input_cb);
}
}
}