summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/rhimportd/ctrlWatchDir.go6
-rw-r--r--src/rhimportd/ctrlWebSimple.go2
2 files changed, 5 insertions, 3 deletions
diff --git a/src/rhimportd/ctrlWatchDir.go b/src/rhimportd/ctrlWatchDir.go
index 7ab0a12..1b08e62 100644
--- a/src/rhimportd/ctrlWatchDir.go
+++ b/src/rhimportd/ctrlWatchDir.go
@@ -72,7 +72,7 @@ func newWatchDirRequestData(conf *rhimport.Config) *watchDirRequestData {
}
type watchDirResponseData struct {
- ResponseCode int `json:"REPONSE_CODE"`
+ ResponseCode int `json:"RESPONSE_CODE"`
ErrorString string `json:"ERROR_STRING"`
Cart uint `json:"CART_NUMBER"`
Cut uint `json:"CUT_NUMBER"`
@@ -124,7 +124,9 @@ func watchDirParseRequest(conf *rhimport.Config, db *rddb.DBChan, req *os.File)
ctx.AutotrimLevel = reqdata.AutotrimLevel
ctx.UseMetaData = reqdata.UseMetaData
ctx.SourceUri = reqdata.SourceUri
- err = ctx.SourceFilePolicy.FromString(reqdata.SourceFilePolicy)
+ if reqdata.SourceFilePolicy != "" {
+ err = ctx.SourceFilePolicy.FromString(reqdata.SourceFilePolicy)
+ }
return
}
diff --git a/src/rhimportd/ctrlWebSimple.go b/src/rhimportd/ctrlWebSimple.go
index 7c5e569..05bbb4d 100644
--- a/src/rhimportd/ctrlWebSimple.go
+++ b/src/rhimportd/ctrlWebSimple.go
@@ -69,7 +69,7 @@ func newWebSimpleRequestData(conf *rhimport.Config) *webSimpleRequestData {
}
type webSimpleResponseData struct {
- ResponseCode int `json:"REPONSE_CODE"`
+ ResponseCode int `json:"RESPONSE_CODE"`
ErrorString string `json:"ERROR_STRING"`
Cart uint `json:"CART_NUMBER"`
Cut uint `json:"CUT_NUMBER"`