diff options
author | KatolaZ <katolaz@freaknet.org> | 2017-08-07 09:55:35 +0100 |
---|---|---|
committer | KatolaZ <katolaz@freaknet.org> | 2017-08-07 09:55:35 +0100 |
commit | 096b3fd2867d7bb2d3cd1f85d8806c651b26d625 (patch) | |
tree | 4dfcc77e86cc0e667c14a92c43d1785b4cb5e4b8 /spooler.go | |
parent | 802d703f617036ec1d18aa8ecb9678ca3390f68a (diff) | |
parent | d3105e671a19fec1060652531ce783227fb9fab6 (diff) |
Merge branch 'devel'
Diffstat (limited to 'spooler.go')
-rw-r--r-- | spooler.go | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -11,7 +11,7 @@ import ( ) // parse a request file and return a SCORSHmessage -func parseRequest(fname string, msg *SCORSHmsg) error { +func parseRequest(fname string, msg *spoolMsg) error { debug.log("[parseRequest] message at start: %s\n", msg) @@ -33,7 +33,7 @@ func parseRequest(fname string, msg *SCORSHmsg) error { return nil } -func spooler(watcher *fsnotify.Watcher, master chan SCORSHmsg) { +func spooler(watcher *fsnotify.Watcher, master chan spoolMsg) { log.Println("Spooler started correctly") @@ -44,7 +44,7 @@ func spooler(watcher *fsnotify.Watcher, master chan SCORSHmsg) { // "Write" event, which should happen only when the file is // created if event.Op == fsnotify.Write { - var msg SCORSHmsg + var msg spoolMsg debug.log("[spooler] new file %s detected\n", event.Name) err := parseRequest(event.Name, &msg) if err != nil { @@ -71,7 +71,7 @@ func spooler(watcher *fsnotify.Watcher, master chan SCORSHmsg) { } } -func startSpooler(master *SCORSHmaster) error { +func startSpooler(master *master) error { watcher, err := fsnotify.NewWatcher() |