summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChristian Pointner <equinox@helsinki.at>2015-12-19 23:30:38 (GMT)
committerChristian Pointner <equinox@helsinki.at>2015-12-19 23:30:38 (GMT)
commitbd59032dd4175282340a0904ff2d84e7cbbcb7e0 (patch)
tree6057a5c1996d68b15b7af01205b89451669d7bc3 /src
parent9d0225a63984b408c5246696fd06930386a17bca (diff)
minor refactoring
Diffstat (limited to 'src')
-rw-r--r--src/helsinki.at/rhimportd/ctrlTelnet.go9
1 files changed, 4 insertions, 5 deletions
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)
}