diff options
author | Sébastien Helleu <flashcode@flashtux.org> | 2016-05-27 20:13:35 +0200 |
---|---|---|
committer | Sébastien Helleu <flashcode@flashtux.org> | 2016-05-27 20:13:35 +0200 |
commit | 7342a47de00b310dcc3d1f5babb99bdecb9382aa (patch) | |
tree | afe9a927d9c61fc8479d5133af2e9eb4315d1849 /src/plugins/xfer | |
parent | 7b053b7c40939c999b979531c567291788cb0233 (diff) | |
download | weechat-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.c | 5 | ||||
-rw-r--r-- | src/plugins/xfer/xfer.c | 10 |
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; } |