diff --git a/wavesrv/pkg/remote/sshclient.go b/wavesrv/pkg/remote/sshclient.go index 0ce109804..5ea391b44 100644 --- a/wavesrv/pkg/remote/sshclient.go +++ b/wavesrv/pkg/remote/sshclient.go @@ -73,7 +73,7 @@ func createInteractivePasswordCallbackPrompt() func() (secret string, err error) QueryText: "Password:", Title: "Password Authentication", } - response, err := sstore.MainBus.GetUserInput(request, ctx) + response, err := sstore.MainBus.GetUserInput(ctx, request) if err != nil { return "", err } @@ -133,7 +133,7 @@ func promptChallengeQuestion(question string, echo bool) (answer string, err err QueryText: question, Title: "Keyboard Interactive Authentication", } - response, err := sstore.MainBus.GetUserInput(request, ctx) + response, err := sstore.MainBus.GetUserInput(ctx, request) if err != nil { return "", err } @@ -216,7 +216,7 @@ func createUnknownKeyVerifier(knownHostsFile string, hostname string, remote str return func() (*scpacket.UserInputResponsePacketType, error) { ctx, cancelFn := context.WithTimeout(context.Background(), 60*time.Second) defer cancelFn() - return sstore.MainBus.GetUserInput(request, ctx) + return sstore.MainBus.GetUserInput(ctx, request) } } @@ -240,7 +240,7 @@ func createMissingKnownHostsVerifier(knownHostsFile string, hostname string, rem return func() (*scpacket.UserInputResponsePacketType, error) { ctx, cancelFn := context.WithTimeout(context.Background(), 60*time.Second) defer cancelFn() - return sstore.MainBus.GetUserInput(request, ctx) + return sstore.MainBus.GetUserInput(ctx, request) } } diff --git a/wavesrv/pkg/sstore/updatebus.go b/wavesrv/pkg/sstore/updatebus.go index 4fd950d5c..3bc5c2237 100644 --- a/wavesrv/pkg/sstore/updatebus.go +++ b/wavesrv/pkg/sstore/updatebus.go @@ -316,7 +316,7 @@ func (bus *UpdateBus) GetUserInputChannel(id string) (chan *scpacket.UserInputRe return uich, ok } -func (bus *UpdateBus) GetUserInput(userInputRequest *UserInputRequestType, ctx context.Context) (*scpacket.UserInputResponsePacketType, error) { +func (bus *UpdateBus) GetUserInput(ctx context.Context, userInputRequest *UserInputRequestType) (*scpacket.UserInputResponsePacketType, error) { id, uich := bus.registerUserInputChannel() defer bus.unregisterUserInputChannel(id)