diff options
author | James Booth <boothj5@gmail.com> | 2014-02-15 19:47:09 +0000 |
---|---|---|
committer | James Booth <boothj5@gmail.com> | 2014-02-15 19:47:36 +0000 |
commit | bdfcc81b075145b5fcf9a089bdff5cffe250dc1f (patch) | |
tree | 5574b3e53db8bd04b511dcd77e47a87749b18519 /src/otr | |
parent | 9ff7a2a1fee12b41632164884cef41141d57ab85 (diff) | |
download | profani-tty-bdfcc81b075145b5fcf9a089bdff5cffe250dc1f.tar.gz |
Only show error message when err != 0
fixes #307
Diffstat (limited to 'src/otr')
-rw-r--r-- | src/otr/otrlibv4.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/otr/otrlibv4.c b/src/otr/otrlibv4.c index c9442a90..f0b58a46 100644 --- a/src/otr/otrlibv4.c +++ b/src/otr/otrlibv4.c @@ -62,10 +62,12 @@ cb_handle_msg_event(void *opdata, OtrlMessageEvent msg_event, ConnContext *context, const char *message, gcry_error_t err) { - if (message != NULL) { - cons_show_error("%s", message); - } else { - cons_show_error("OTR error event with no message."); + if (err != 0) { + if (message != NULL) { + cons_show_error("%s", message); + } else { + cons_show_error("OTR error event with no message."); + } } } |