update
This commit is contained in:
parent
19c1b9b60a
commit
b5e8f736d5
4
rules.go
4
rules.go
@ -16,7 +16,7 @@ func resetMsgParsingRules2() error {
|
|||||||
|
|
||||||
err = json.Unmarshal(b, &rules)
|
err = json.Unmarshal(b, &rules)
|
||||||
|
|
||||||
for r := range rules {
|
for _, r := range rules {
|
||||||
r.MsgTypeID64, err = codeObjSubTypeId(r.MsgType)
|
r.MsgTypeID64, err = codeObjSubTypeId(r.MsgType)
|
||||||
logOnError(err, "resetMsgParsingRules2 : codeObjSubTypeId("+r.MsgType+")")
|
logOnError(err, "resetMsgParsingRules2 : codeObjSubTypeId("+r.MsgType+")")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@ -43,7 +43,7 @@ func resetMsgParsingRules2() error {
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
defer stmt.Close()
|
defer stmt.Close()
|
||||||
for r := range rules {
|
for _, r := range rules {
|
||||||
_, err = stmt.Exec(r.Priority, r.MsgTypeID64, r.Description, r.Rule)
|
_, err = stmt.Exec(r.Priority, r.MsgTypeID64, r.Description, r.Rule)
|
||||||
logOnError(err, "resetMsgParsingRules2 : insert statement "+r.Description)
|
logOnError(err, "resetMsgParsingRules2 : insert statement "+r.Description)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
Loading…
Reference in New Issue
Block a user