summaryrefslogtreecommitdiff
path: root/ovsdb/monitor.c
diff options
context:
space:
mode:
authorAndy Zhou <azhou@nicira.com>2015-03-17 21:25:20 -0700
committerAndy Zhou <azhou@nicira.com>2015-05-29 17:39:50 -0700
commit61b63013e6074478d264d20c2db0edf17e57a0ff (patch)
treed1cc7b043421a0cd5f4b3a897872646000e0fc61 /ovsdb/monitor.c
parent2fa1df7b88611f8858882147b5db122c5644799c (diff)
downloadopenvswitch-61b63013e6074478d264d20c2db0edf17e57a0ff.tar.gz
ovsdb-monitor: refactoring ovsdb_monitor_get_initial
Refactoring ovsdb_monitor_get_initial() to not generate JSON object. It only collect changes within the ovsdb_monitor(). ovsdb_jsonrpc_monitor_compose_table_update() is then used to generate JSON object. This change will also make future patch easier. Signed-off-by: Andy Zhou <azhou@nicira.com> Acked-by: Ben Pfaff <blp@nicira.com>
Diffstat (limited to 'ovsdb/monitor.c')
-rw-r--r--ovsdb/monitor.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/ovsdb/monitor.c b/ovsdb/monitor.c
index a1aeb5f51..95299cebb 100644
--- a/ovsdb/monitor.c
+++ b/ovsdb/monitor.c
@@ -505,12 +505,11 @@ ovsdb_monitor_change_cb(const struct ovsdb_row *old,
return true;
}
-struct json *
+void
ovsdb_monitor_get_initial(const struct ovsdb_monitor *dbmon)
{
struct ovsdb_monitor_aux aux;
struct shash_node *node;
- struct json *json;
ovsdb_monitor_init_aux(&aux, dbmon);
SHASH_FOR_EACH (node, &dbmon->tables) {
@@ -524,8 +523,6 @@ ovsdb_monitor_get_initial(const struct ovsdb_monitor *dbmon)
}
}
}
- json = ovsdb_monitor_compose_table_update(dbmon, true);
- return json ? json : json_object_create();
}
void