Prevent weird messages from rpc lib on start (Fixes #3209): (#3212)

This is done by not making the methods of the BucketMetaState interface
as methods (via type nesting) on the type implementing
RPCs (s3PeerAPIHandlers).
This commit is contained in:
Aditya Manthramurthy 2016-11-09 02:47:44 -05:00 committed by Harshavardhana
parent 9c2cfb5cb6
commit d44e9d6da9
2 changed files with 5 additions and 5 deletions

View File

@ -27,7 +27,7 @@ const (
)
type s3PeerAPIHandlers struct {
*localBMS
bms BucketMetaState
}
func registerS3PeerRPCRouter(mux *router.Router) error {

View File

@ -54,7 +54,7 @@ func (s3 *s3PeerAPIHandlers) SetBucketNotificationPeer(args *SetBNPArgs, reply *
return errInvalidToken
}
return s3.UpdateBucketNotification(args)
return s3.bms.UpdateBucketNotification(args)
}
// SetBLPArgs - Arguments collection to SetBucketListenerPeer RPC call
@ -74,7 +74,7 @@ func (s3 *s3PeerAPIHandlers) SetBucketListenerPeer(args *SetBLPArgs, reply *Gene
return errInvalidToken
}
return s3.UpdateBucketListener(args)
return s3.bms.UpdateBucketListener(args)
}
// EventArgs - Arguments collection for Event RPC call
@ -96,7 +96,7 @@ func (s3 *s3PeerAPIHandlers) Event(args *EventArgs, reply *GenericReply) error {
return errInvalidToken
}
return s3.SendEvent(args)
return s3.bms.SendEvent(args)
}
// SetBPPArgs - Arguments collection for SetBucketPolicyPeer RPC call
@ -117,5 +117,5 @@ func (s3 *s3PeerAPIHandlers) SetBucketPolicyPeer(args *SetBPPArgs, reply *Generi
return errInvalidToken
}
return s3.UpdateBucketPolicy(args)
return s3.bms.UpdateBucketPolicy(args)
}