aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorunknown <pesco@khjk.org>2013-08-03 15:36:53 +0200
committerunknown <pesco@khjk.org>2013-08-03 15:36:53 +0200
commit51f937efd8653a3dc79ba1dbdb93fc2c69c78504 (patch)
tree6eb43063c22db824b4b34eaa7f217aa30ddfbc8d
parente4752a6162d27e7292df912ab3bbf71f214e6cce (diff)
log OTR heartbeats if set verbose
-rw-r--r--otr.c14
1 files changed, 13 insertions, 1 deletions
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;
}
}