@@ 25,15 25,10 @@ proc getConfig(chan: Channel; key: string): string =
if result == "":
chan.exit(key & " not configured for this remote")
-proc setConfig(chan: Channel; key, val: string) =
- chan.send "SETCONFIG", key, val
-
proc main() =
var
annex = newChannel(newFileStream(stdout), newFileStream(stdin))
- nncp: Channel
node, handler, uuid: string
- line, command: string
annex.send "VERSION 1"
while true:
let command = readCommand(annex)
@@ 44,8 39,8 @@ proc main() =
of "INITREMOTE":
discard annex.getConfig"node"
discard annex.getConfig"handler"
- annex.send "INITREMOTE-SUCCESS"
# check that configuration is set during initialization
+ annex.send "INITREMOTE-SUCCESS"
of "PREPARE":
node = annex.getConfig"node"
handler = annex.getConfig"handler"