summaryrefslogtreecommitdiff
path: root/src/plugins/xfer
diff options
context:
space:
mode:
authorSébastien Helleu <flashcode@flashtux.org>2016-05-27 20:13:35 +0200
committerSébastien Helleu <flashcode@flashtux.org>2016-05-27 20:13:35 +0200
commit7342a47de00b310dcc3d1f5babb99bdecb9382aa (patch)
treeafe9a927d9c61fc8479d5133af2e9eb4315d1849 /src/plugins/xfer
parent7b053b7c40939c999b979531c567291788cb0233 (diff)
downloadweechat-7342a47de00b310dcc3d1f5babb99bdecb9382aa.zip
core, irc, xfer: display more information in memory allocation errors (issue #573)
Diffstat (limited to 'src/plugins/xfer')
-rw-r--r--src/plugins/xfer/xfer-network.c5
-rw-r--r--src/plugins/xfer/xfer.c10
2 files changed, 9 insertions, 6 deletions
diff --git a/src/plugins/xfer/xfer-network.c b/src/plugins/xfer/xfer-network.c
index f52345dee..a6871376d 100644
--- a/src/plugins/xfer/xfer-network.c
+++ b/src/plugins/xfer/xfer-network.c
@@ -620,8 +620,9 @@ xfer_network_connect_chat_recv_cb (const void *pointer, void *data,
break;
case WEECHAT_HOOK_CONNECT_MEMORY_ERROR:
weechat_printf (NULL,
- _("%s%s: not enough memory"),
- weechat_prefix ("error"), XFER_PLUGIN_NAME);
+ _("%s%s: not enough memory (%s)"),
+ weechat_prefix ("error"), XFER_PLUGIN_NAME,
+ (error) ? error : "-");
break;
case WEECHAT_HOOK_CONNECT_TIMEOUT:
weechat_printf (NULL,
diff --git a/src/plugins/xfer/xfer.c b/src/plugins/xfer/xfer.c
index fb7d5ff52..25b855124 100644
--- a/src/plugins/xfer/xfer.c
+++ b/src/plugins/xfer/xfer.c
@@ -1119,16 +1119,18 @@ xfer_add_cb (const void *pointer, void *data,
if (!path)
{
weechat_printf (NULL,
- _("%s%s: not enough memory"),
- weechat_prefix ("error"), XFER_PLUGIN_NAME);
+ _("%s%s: not enough memory (%s)"),
+ weechat_prefix ("error"), XFER_PLUGIN_NAME,
+ "xfer_add, path");
goto error;
}
filename2 = malloc (strlen (path) + strlen (filename) + 4);
if (!filename2)
{
weechat_printf (NULL,
- _("%s%s: not enough memory"),
- weechat_prefix ("error"), XFER_PLUGIN_NAME);
+ _("%s%s: not enough memory (%s)"),
+ weechat_prefix ("error"), XFER_PLUGIN_NAME,
+ "xfer_add, filename2");
free (path);
goto error;
}