aboutsummaryrefslogtreecommitdiff
path: root/monitor.c
diff options
context:
space:
mode:
authorWenchao Xia <wenchaoqemu@gmail.com>2014-06-24 16:34:00 -0700
committerLuiz Capitulino <lcapitulino@redhat.com>2014-06-27 09:27:56 -0400
commit2f44a08b3e2a42eb78dcb75657e007dffacba30d (patch)
tree7122392a1cd58170934300954da8ff56b01df2d0 /monitor.c
parentd6f9c82c62023c1ed5af76847c55b0a663bdd2cc (diff)
qapi event: clean up in callers
This patch improves docs and address small issues in event callers. Signed-off-by: Wenchao Xia <wenchaoqemu@gmail.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Diffstat (limited to 'monitor.c')
-rw-r--r--monitor.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/monitor.c b/monitor.c
index a8ab600c88..fd34ab705a 100644
--- a/monitor.c
+++ b/monitor.c
@@ -570,6 +570,7 @@ monitor_qapi_event_throttle(QAPIEvent event, int64_t rate)
trace_monitor_protocol_event_throttle(event, rate);
evstate->event = event;
+ assert(rate * SCALE_MS <= INT64_MAX);
evstate->rate = rate * SCALE_MS;
evstate->last = 0;
evstate->data = NULL;
@@ -585,7 +586,6 @@ static void monitor_qapi_event_init(void)
monitor_qapi_event_throttle(QAPI_EVENT_RTC_CHANGE, 1000);
monitor_qapi_event_throttle(QAPI_EVENT_WATCHDOG, 1000);
monitor_qapi_event_throttle(QAPI_EVENT_BALLOON_CHANGE, 1000);
- /* limit the rate of quorum events to avoid hammering the management */
monitor_qapi_event_throttle(QAPI_EVENT_QUORUM_REPORT_BAD, 1000);
monitor_qapi_event_throttle(QAPI_EVENT_QUORUM_FAILURE, 1000);