This commit is contained in:
shoopea 2019-12-29 19:48:43 +08:00
parent 19c1b9b60a
commit b5e8f736d5

View File

@ -16,7 +16,7 @@ func resetMsgParsingRules2() error {
err = json.Unmarshal(b, &rules)
for r := range rules {
for _, r := range rules {
r.MsgTypeID64, err = codeObjSubTypeId(r.MsgType)
logOnError(err, "resetMsgParsingRules2 : codeObjSubTypeId("+r.MsgType+")")
if err != nil {
@ -43,7 +43,7 @@ func resetMsgParsingRules2() error {
return err
}
defer stmt.Close()
for r := range rules {
for _, r := range rules {
_, err = stmt.Exec(r.Priority, r.MsgTypeID64, r.Description, r.Rule)
logOnError(err, "resetMsgParsingRules2 : insert statement "+r.Description)
if err != nil {