Skip to content

Commit

Permalink
Iface.cpp fix.
Browse files Browse the repository at this point in the history
  • Loading branch information
tomaszmrugalski committed Oct 10, 2016
1 parent cda62b7 commit cbd898b
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions IfaceMgr/Iface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -226,8 +226,9 @@ bool TIfaceIface::addAddr(SPtr<TIPv6Addr> addr,long pref, long valid, int prefix
Log(Notice) << "Address " << addr->getPlain() << "/" << prefixLen << " added to "
<< getFullName() << " interface." << LogEnd;

return (bool)ipaddr_add(this->Name, this->ID, addr->getPlain(),
int status = ipaddr_add(this->Name, this->ID, addr->getPlain(),
pref, valid, prefixLen);
return (status == LOWLEVEL_NO_ERROR);
}

/**
Expand All @@ -237,7 +238,8 @@ bool TIfaceIface::addAddr(SPtr<TIPv6Addr> addr,long pref, long valid, int prefix
bool TIfaceIface::delAddr(SPtr<TIPv6Addr> addr, int prefixLen) {
Log(Notice) << "Address " << addr->getPlain() << "/" << prefixLen << " deleted from "
<< getFullName() << " interface." << LogEnd;
return (bool)ipaddr_del( this->Name, this->ID, addr->getPlain(), prefixLen);
int status = ipaddr_del( this->Name, this->ID, addr->getPlain(), prefixLen);
return (status == LOWLEVEL_NO_ERROR);
}

/**
Expand All @@ -251,10 +253,7 @@ bool TIfaceIface::updateAddr(SPtr<TIPv6Addr> addr, long pref, long valid) {
result = ipaddr_update((char *)this->Name, this->ID, (char *)addr->getPlain(),
pref, valid, this->PrefixLen);

if (result!=LOWLEVEL_NO_ERROR)
return false;

return true;
return (result == LOWLEVEL_NO_ERROR);
}

/**
Expand Down

0 comments on commit cbd898b

Please sign in to comment.