Skip to content

Commit

Permalink
Merge pull request #1 from wlan0/fix-bug
Browse files Browse the repository at this point in the history
Pass by-ref instead of by-value
  • Loading branch information
brahmaroutu authored Dec 18, 2020
2 parents 00b8480 + 51c9a23 commit d74d9ce
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/controller/bucketaccess/bucket_access_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ func (bal *bucketAccessListener) Add(ctx context.Context, obj *v1alpha1.BucketAc
// Only update the principal in the BucketAccess if it wasn't set because
// that means that the provisioner created one
if len(obj.Spec.Principal) == 0 {
err = bal.updatePrincipal(ctx, obj.Name, *rsp)
err = bal.updatePrincipal(ctx, obj.Name, rsp)
if err != nil {
return err
}
Expand Down Expand Up @@ -260,7 +260,7 @@ func (bal *bucketAccessListener) updateStatus(ctx context.Context, name, msg str
return err
}

func (bal *bucketAccessListener) updatePrincipal(ctx context.Context, name string, resp osspec.ProvisionerGrantBucketAccessResponse) error {
func (bal *bucketAccessListener) updatePrincipal(ctx context.Context, name string, resp *osspec.ProvisionerGrantBucketAccessResponse) error {
err := retry.RetryOnConflict(retry.DefaultRetry, func() error {
bucketAccess, err := bal.bucketAccessClient.ObjectstorageV1alpha1().BucketAccesses().Get(ctx, name, metav1.GetOptions{})
if err != nil {
Expand Down

0 comments on commit d74d9ce

Please sign in to comment.