于 2014/5/2 6:09, Eric Blake 写道:
On 04/30/2014 10:26 PM, Wenchao Xia wrote:
Now monitor has been hooked on the new event mechanism, so the patches
later can convert event callers one by one. qmp_query_events() is also
switched to use new generated event defines. Note that old function
monitor_protocol_event() is kept for existing caller to avoid code break,
but rate limiting is bypassed to avoid too many duplicated code. After
convertion, the function would be removed.

s/convertion/conversion/
s/would/will/


Signed-off-by: Wenchao Xia <wenchaoq...@gmail.com>
---
  monitor.c |   47 ++++++++++++++++++++++++++---------------------
  1 files changed, 26 insertions(+), 21 deletions(-)


@@ -644,7 +648,8 @@ void monitor_protocol_event(MonitorEvent event, QObject 
*data)
      }

      trace_monitor_protocol_event(event, event_name, qmp);
-    monitor_protocol_event_queue(event, QOBJECT(qmp));
+    /* Bypass rate limiting for now */
+    monitor_protocol_event_emit(event, QOBJECT(qmp));
      QDECREF(qmp);

I'm not quite sure I follow - is this comment evidence of something
temporarily broken for the duration of conversions, that gets fixed
later in the series; or are you breaking event rate limiting?

  This change breaks rate limiting, but gets fixed after conversion.
Since I modified old rate limiting code to work in new event mechnism,
so old event mechnism can't work any more, unless I duplicate those
code, make things complicate.



Reply via email to