fatal-signal: After fork, clear hooks instead of disabling them.
[openvswitch] / lib / ovsdb-idl.c
index 29d1d0c4016fac13cbd29f7556f095150297dcd1..a4407a57d44ace17f0a4ee199a5dab0eac73d01d 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2009 Nicira Networks.
+/* Copyright (c) 2009, 2010 Nicira Networks.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -291,6 +291,12 @@ ovsdb_idl_get_seqno(const struct ovsdb_idl *idl)
     return idl->change_seqno;
 }
 
+bool
+ovsdb_idl_has_ever_connected(const struct ovsdb_idl *idl)
+{
+    return ovsdb_idl_get_seqno(idl) != 0;
+}
+
 void
 ovsdb_idl_force_reconnect(struct ovsdb_idl *idl)
 {
@@ -1121,6 +1127,7 @@ ovsdb_idl_txn_commit(struct ovsdb_idl_txn *txn)
 
     if (!any_updates) {
         txn->status = TXN_UNCHANGED;
+        json_destroy(operations);
     } else if (!jsonrpc_session_send(
                    txn->idl->session,
                    jsonrpc_create_request(