Skip to content
This repository was archived by the owner on Jun 20, 2024. It is now read-only.

Commit

Permalink
Merge pull request #1219 from squaremo/driveby
Browse files Browse the repository at this point in the history
Remove misleading comment and lowercase deniedBy
  • Loading branch information
rade committed Jul 28, 2015
2 parents 1701bc3 + c883614 commit 7735814
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion ipam/allocator.go
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ func (alloc *Allocator) spaceRequestDenied(sender router.PeerName, r address.Ran
for i := 0; i < len(alloc.pendingClaims); {
claim := alloc.pendingClaims[i].(*claim)
if r.Contains(claim.addr) {
claim.DeniedBy(alloc, sender)
claim.deniedBy(alloc, sender)
alloc.pendingClaims = append(alloc.pendingClaims[:i], alloc.pendingClaims[i+1:]...)
continue
}
Expand Down
6 changes: 3 additions & 3 deletions ipam/claim.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ func (c *claim) Try(alloc *Allocator) bool {
// If our ring doesn't know, it must be empty.
if c.noErrorOnUnknown {
alloc.infof("Claim %s for %s: address allocator still initializing; will try later.", c.addr, c.ident)
c.sendResult(nil) // don't make the caller wait
c.sendResult(nil)
} else {
c.sendResult(fmt.Errorf("%s is in the range %s, but the allocator is not initialized yet", c.addr, alloc.universe.AsCIDRString()))
}
Expand All @@ -60,7 +60,7 @@ func (c *claim) Try(alloc *Allocator) bool {
alloc.infof("Claim %s for %s: %s; will try later.", c.addr, c.ident, err)
c.sendResult(nil)
} else { // just tell the user they can't do this.
c.DeniedBy(alloc, owner)
c.deniedBy(alloc, owner)
}
}
return false
Expand All @@ -86,7 +86,7 @@ func (c *claim) Try(alloc *Allocator) bool {
return true
}

func (c *claim) DeniedBy(alloc *Allocator, owner router.PeerName) {
func (c *claim) deniedBy(alloc *Allocator, owner router.PeerName) {
name, found := alloc.nicknames[owner]
if found {
name = " (" + name + ")"
Expand Down

0 comments on commit 7735814

Please sign in to comment.