ovsdb: Make JSON-RPC sessions other than the first work.
authorBen Pfaff <blp@nicira.com>
Fri, 6 Nov 2009 20:26:00 +0000 (12:26 -0800)
committerBen Pfaff <blp@nicira.com>
Fri, 6 Nov 2009 20:26:22 +0000 (12:26 -0800)
The number of open sessions wasn't being tracked properly, so closing a
JSON-RPC database session made it impossible to open any more.

ovsdb/jsonrpc-server.c

index f6770640df5fb48338eabb40aed33ef59b32a4ed..e97a2c333978b6e301132707cbc00b52738e0aa9 100644 (file)
@@ -263,6 +263,7 @@ ovsdb_jsonrpc_session_open(struct ovsdb_jsonrpc_server *svr,
     s->rpc = jsonrpc_open(stream);
     hmap_init(&s->triggers);
     list_init(&s->completions);
+    svr->n_sessions++;
 }
 
 static void