From bdfcc81b075145b5fcf9a089bdff5cffe250dc1f Mon Sep 17 00:00:00 2001 From: James Booth Date: Sat, 15 Feb 2014 19:47:09 +0000 Subject: Only show error message when err != 0 fixes #307 --- src/otr/otrlibv4.c | 10 ++++++---- 1 file 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."); + } } } -- cgit 1.4.1-2-gfad0