Commit ff922f2c authored by Robert Ricci's avatar Robert Ricci

Fix some bitrot - The leader of the stack no longer necessarily shares

a name with the stack. Get the leader name from the switch_stack types
table.
parent 90657d41
......@@ -70,21 +70,29 @@ sub new($$$@) {
#
# We only need to create 1 snmpit_intel object, since we only have to
# talk to one (for now) to do all the setup we need.
# talk to one (for now) to do all the setup we need. We fall back on the
# old behavior of using the stack name as the leader if the leader is not
# set
#
my $leader_name = getStackLeader($stack_id);
if (!$leader_name) {
$leader_name = $stack_id;
}
$self->{LEADERNAME} = $leader_name;
use snmpit_intel;
$self->{LEADER} = new snmpit_intel($stack_id,$self->{DEBUG});
$self->{LEADER} = new snmpit_intel($leader_name,$self->{DEBUG});
#
# Check for failed object creation
#
if (!$self->{LEADER}) {
#
# The snmpit_intel object has already printed an error message,
# so we'll just return an error
#
return undef;
}
#
# Check for failed object creation
#
if (!$self->{LEADER}) {
#
# The snmpit_intel object has already printed an error message,
# so we'll just return an error
#
return undef;
}
bless($self,$class);
return $self;
......
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