In case that we flushed everything already, we can immeidately return NULL.
Signed-off-by: Liran Schour <lir...@il.ibm.com> --- ovsdb/monitor.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ovsdb/monitor.c b/ovsdb/monitor.c index 5ae9cdb..1a07f19 100644 --- a/ovsdb/monitor.c +++ b/ovsdb/monitor.c @@ -733,6 +733,10 @@ ovsdb_monitor_get_update(struct ovsdb_monitor *dbmon, uint64_t prev_txn = *unflushed; uint64_t next_txn = dbmon->n_transactions + 1; + if (prev_txn == next_txn) { + return NULL; + } + /* Return a clone of cached json if one exists. Otherwise, * generate a new one and add it to the cache. */ cache_node = ovsdb_monitor_json_cache_search(dbmon, version, prev_txn); -- 2.1.4 _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev