ofproto-dpif-monitor: Acquire write lock in monitor_run().
[sliver-openvswitch.git] / ofproto / ofproto-dpif-monitor.c
index 2a833bb..af66387 100644 (file)
@@ -197,7 +197,7 @@ monitor_run(void)
     struct ofpbuf packet;
 
     ofpbuf_use_stub(&packet, stub, sizeof stub);
-    ovs_rwlock_rdlock(&monitor_rwlock);
+    ovs_rwlock_wrlock(&monitor_rwlock);
     prio_now = MSEC_TO_PRIO(time_msec());
     /* Peeks the top of heap and checks if we should run this mport. */
     while (!heap_is_empty(&monitor_heap)