@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 <r...@vmware.com> --- datapath-windows/ovsext/Switch.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/datapath-windows/ovsext/Switch.c b/datapath-windows/ovsext/Switch.c index 825fa3c..7913cd5 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) { @@ -573,7 +572,7 @@ OvsActivateSwitch(POVS_SWITCH_CONTEXT switchContext) } cleanup: - if (status != NDIS_STATUS_SUCCESS) { + if (status == NDIS_STATUS_SUCCESS) { switchContext->isActivated = TRUE; } -- 2.6.2 _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev