From bd59032dd4175282340a0904ff2d84e7cbbcb7e0 Mon Sep 17 00:00:00 2001 From: Christian Pointner Date: Sun, 20 Dec 2015 00:30:38 +0100 Subject: minor refactoring diff --git a/src/helsinki.at/rhimportd/ctrlTelnet.go b/src/helsinki.at/rhimportd/ctrlTelnet.go index b2bcfa1..4300bd4 100644 --- a/src/helsinki.at/rhimportd/ctrlTelnet.go +++ b/src/helsinki.at/rhimportd/ctrlTelnet.go @@ -302,17 +302,16 @@ func (c *TelnetClient) handle_cmd_run(args []string) { c.say("context is empty please set at least one option") return } - ctx := *c.ctx - if err := ctx.SanityCheck(); err != nil { + if err := c.ctx.SanityCheck(); err != nil { c.say("sanity check for import context returned: %s", err) return } stdout := make(chan string) - ctx.ProgressCallBack = telnet_progress_callback - ctx.ProgressCallBackData = (chan<- string)(stdout) - go telnet_cmd_run(ctx, stdout) + c.ctx.ProgressCallBack = telnet_progress_callback + c.ctx.ProgressCallBackData = (chan<- string)(stdout) + go telnet_cmd_run(*c.ctx, stdout) for str := range stdout { c.write_string(str) } -- cgit v0.10.2