diff options
author | Shashank Ram <rams@vmware.com> | 2016-10-10 15:15:05 -0700 |
---|---|---|
committer | Gurucharan Shetty <guru@ovn.org> | 2016-10-31 10:04:01 -0700 |
commit | 01dee7de6661bb2cd5ff20085dbfb7c1d8084d01 (patch) | |
tree | 999ded93110513cc76f0422cc9067745a0055874 | |
parent | 8bb0434a1efeddd4c56d86506b54357707b7f798 (diff) | |
download | openvswitch-01dee7de6661bb2cd5ff20085dbfb7c1d8084d01.tar.gz |
datapath-windows: Set isActivated flag only on success
@Switch.c: Modifies OvsActivateSwitch() function
to mark the switch as activated only if the
the status is success. The callers itself
only call this method when the isActivated
flag is unset.
Signed-off-by: Shashank Ram <rams@vmware.com>
Acked-by: Sairam Venugopal <vsairam@vmware.com>
Acked-by: Nithin Raju <nithin@vmware.com>
Signed-off-by: Gurucharan Shetty <guru@ovn.org>
-rw-r--r-- | datapath-windows/ovsext/Switch.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/datapath-windows/ovsext/Switch.c b/datapath-windows/ovsext/Switch.c index 825fa3c8f..49711a9ef 100644 --- a/datapath-windows/ovsext/Switch.c +++ b/datapath-windows/ovsext/Switch.c @@ -556,7 +556,6 @@ OvsActivateSwitch(POVS_SWITCH_CONTEXT switchContext) OVS_LOG_TRACE("Enter: activate switch %p, dpNo: %ld", switchContext, switchContext->dpNo); - switchContext->isActivated = TRUE; status = OvsAddConfiguredSwitchPorts(switchContext); if (status != NDIS_STATUS_SUCCESS) { @@ -572,11 +571,9 @@ OvsActivateSwitch(POVS_SWITCH_CONTEXT switchContext) goto cleanup; } -cleanup: - if (status != NDIS_STATUS_SUCCESS) { - switchContext->isActivated = TRUE; - } + switchContext->isActivated = TRUE; +cleanup: OVS_LOG_TRACE("Exit: activate switch:%p, isActivated: %s, status = %lx", switchContext, (switchContext->isActivated ? "TRUE" : "FALSE"), status); |