Commit 88cd71c0 authored by Mike Hibler's avatar Mike Hibler

Clear the @setcmds list before each iteration of the loop that invokes callRPC.

Note that it might be the case that the callRPC should be outside the loop
as it is in every other case where a list of commands is built up. But I
thought this case might be special, so I left it as is.

Note also that I don't think it matters because this routine is never
called with more than one vlan that I could see (the loop is for each
vlan).
parent 3b415cce
......@@ -1579,8 +1579,9 @@ sub setVlansOnTrunk($$$$) {
# Yuck. Have to process each vlan in turn, and deal with the "empty list"
# problem. More details in the comments below.
my @setcmds = ();
my @setcmds;
foreach my $vlnum (@vlan_numbers) {
@setcmds = ();
# Only attempt removal if the vlan is actually in the allowed list.
if ($value == 0 && exists($pstate->{$poifindex}{ALLOWED}{$vlnum})) {
# If removing the last entry, then add the default
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment