From 51f937efd8653a3dc79ba1dbdb93fc2c69c78504 Mon Sep 17 00:00:00 2001 From: unknown Date: Sat, 3 Aug 2013 15:36:53 +0200 Subject: log OTR heartbeats if set verbose --- otr.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/otr.c b/otr.c index 80f1786c..8af3add5 100644 --- a/otr.c +++ b/otr.c @@ -879,6 +879,18 @@ void op_handle_msg_event(void *opdata, OtrlMessageEvent ev, ConnContext *ctx, display_otr_message(opdata, ctx, "malformed OTR message received"); break; + case OTRL_MSGEVENT_LOG_HEARTBEAT_RCVD: + if(global.conf->verbose) { + log_otr_message(opdata, "%s/%s: heartbeat received", + ctx->accountname, ctx->protocol); + } + break; + case OTRL_MSGEVENT_LOG_HEARTBEAT_SENT: + if(global.conf->verbose) { + log_otr_message(opdata, "%s/%s: heartbeat sent", + ctx->accountname, ctx->protocol); + } + break; case OTRL_MSGEVENT_RCVDMSG_GENERAL_ERR: display_otr_message(opdata, ctx, "OTR error message received: %s", message); @@ -896,7 +908,7 @@ void op_handle_msg_event(void *opdata, OtrlMessageEvent ev, ConnContext *ctx, "OTR message for a different instance received"); break; default: - /* ignore XXX log? */ + /* shouldn't happen */ break; } } -- cgit v1.2.3