From: Ben Pfaff Date: Thu, 8 Mar 2012 19:23:14 +0000 (-0800) Subject: ovs-monitor-ipsec: Use same pattern as ovs-xapi-sync. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6da258aa4c4552a905af36340be15dcbd42b4ab6;p=openvswitch ovs-monitor-ipsec: Use same pattern as ovs-xapi-sync. This does not fix an actual bug in ovs-monitor-ipsec because it does not ever commit any changes to the database. Signed-off-by: Ben Pfaff --- diff --git a/debian/ovs-monitor-ipsec b/debian/ovs-monitor-ipsec index a4a45754..50242774 100755 --- a/debian/ovs-monitor-ipsec +++ b/debian/ovs-monitor-ipsec @@ -1,5 +1,5 @@ #!/usr/bin/python -# Copyright (c) 2009, 2010, 2011 Nicira Networks +# Copyright (c) 2009, 2010, 2011, 2012 Nicira Networks # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -421,17 +421,20 @@ def main(): ipsec = IPsec() interfaces = {} + seqno = idl.change_seqno # Sequence number when we last processed the db while True: unixctl_server.run() if exiting: break - if not idl.run(): + idl.run() + if seqno == idl.change_seqno: poller = ovs.poller.Poller() unixctl_server.wait(poller) idl.wait(poller) poller.block() continue + seqno = idl.change_seqno ssl_cert = get_ssl_cert(idl.tables)