summaryrefslogtreecommitdiff
path: root/src/helsinki.at/rhimportd/ctrlTelnet.go
diff options
context:
space:
mode:
authorChristian Pointner <equinox@helsinki.at>2015-12-20 01:29:13 (GMT)
committerChristian Pointner <equinox@helsinki.at>2015-12-20 01:29:13 (GMT)
commit8fc2a9c93d566feae576c1421b3c64dabc4b4976 (patch)
tree2fcef9fdc3fa620d44989985b1878b807dbe456f /src/helsinki.at/rhimportd/ctrlTelnet.go
parent9f860e6f74791e103aed25a006dee55d7b3822b5 (diff)
improved type safety
Diffstat (limited to 'src/helsinki.at/rhimportd/ctrlTelnet.go')
-rw-r--r--src/helsinki.at/rhimportd/ctrlTelnet.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/helsinki.at/rhimportd/ctrlTelnet.go b/src/helsinki.at/rhimportd/ctrlTelnet.go
index 49971e1..04d90da 100644
--- a/src/helsinki.at/rhimportd/ctrlTelnet.go
+++ b/src/helsinki.at/rhimportd/ctrlTelnet.go
@@ -43,7 +43,7 @@ type TelnetClient struct {
scanner *bufio.Scanner
writer *bufio.Writer
conf *rhimport.Config
- rddb *rhimport.RdDb
+ rddb *rhimport.RdDbChan
ctx *rhimport.ImportContext
}
@@ -148,7 +148,7 @@ func (c *TelnetClient) handle_cmd_set(args []string) {
}
if c.ctx == nil {
c.ctx = rhimport.NewImportContext(c.conf, c.rddb, "")
- c.ctx.Trusted = false
+ c.ctx.Trusted = true
}
switch strings.ToLower(args[0]) {
case "username":
@@ -365,7 +365,7 @@ func (c *TelnetClient) handle() {
}
}
-func newTelnetClient(conn net.Conn, conf *rhimport.Config, rddb *rhimport.RdDb) (c *TelnetClient) {
+func newTelnetClient(conn net.Conn, conf *rhimport.Config, rddb *rhimport.RdDbChan) (c *TelnetClient) {
rhl.Println("telnet-ctrl: new client from:", conn.RemoteAddr())
c = &TelnetClient{}
c.conn = conn
@@ -377,7 +377,7 @@ func newTelnetClient(conn net.Conn, conf *rhimport.Config, rddb *rhimport.RdDb)
return c
}
-func StartControlTelnet(addr_s string, conf *rhimport.Config, rddb *rhimport.RdDb) {
+func StartControlTelnet(addr_s string, conf *rhimport.Config, rddb *rhimport.RdDbChan) {
rhl.Println("telnet-ctrl: listening on", addr_s)
server, err := net.Listen("tcp", addr_s)