summaryrefslogtreecommitdiff
path: root/spooler.go
diff options
context:
space:
mode:
authorKatolaZ <katolaz@freaknet.org>2017-08-07 09:55:35 +0100
committerKatolaZ <katolaz@freaknet.org>2017-08-07 09:55:35 +0100
commit096b3fd2867d7bb2d3cd1f85d8806c651b26d625 (patch)
tree4dfcc77e86cc0e667c14a92c43d1785b4cb5e4b8 /spooler.go
parent802d703f617036ec1d18aa8ecb9678ca3390f68a (diff)
parentd3105e671a19fec1060652531ce783227fb9fab6 (diff)
Merge branch 'devel'
Diffstat (limited to 'spooler.go')
-rw-r--r--spooler.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/spooler.go b/spooler.go
index e5fe4be..3629bef 100644
--- a/spooler.go
+++ b/spooler.go
@@ -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()