mirror of
https://github.com/mjl-/mox.git
synced 2024-12-27 08:53:48 +03:00
style nit: only take address of structs when passed on
This commit is contained in:
parent
2a949f9f79
commit
b7d6540d51
3 changed files with 6 additions and 6 deletions
4
ctl.go
4
ctl.go
|
@ -336,13 +336,13 @@ func servectlcmd(ctx context.Context, ctl *ctl, shutdown func()) {
|
||||||
err = msgFile.Sync()
|
err = msgFile.Sync()
|
||||||
ctl.xcheck(err, "syncing message to storage")
|
ctl.xcheck(err, "syncing message to storage")
|
||||||
|
|
||||||
m := &store.Message{
|
m := store.Message{
|
||||||
Received: time.Now(),
|
Received: time.Now(),
|
||||||
Size: mw.Size,
|
Size: mw.Size,
|
||||||
}
|
}
|
||||||
|
|
||||||
a.WithWLock(func() {
|
a.WithWLock(func() {
|
||||||
err := a.DeliverDestination(log, addr, m, msgFile)
|
err := a.DeliverDestination(log, addr, &m, msgFile)
|
||||||
ctl.xcheck(err, "delivering message")
|
ctl.xcheck(err, "delivering message")
|
||||||
log.Info("message delivered through ctl", slog.Any("to", to))
|
log.Info("message delivered through ctl", slog.Any("to", to))
|
||||||
})
|
})
|
||||||
|
|
|
@ -276,7 +276,7 @@ func deliverDSN(ctx context.Context, log mlog.Log, m Msg, remoteMTA dsn.NameIP,
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
msg := &store.Message{
|
msg := store.Message{
|
||||||
Received: time.Now(),
|
Received: time.Now(),
|
||||||
Size: msgWriter.Size,
|
Size: msgWriter.Size,
|
||||||
MsgPrefix: []byte{},
|
MsgPrefix: []byte{},
|
||||||
|
@ -294,7 +294,7 @@ func deliverDSN(ctx context.Context, log mlog.Log, m Msg, remoteMTA dsn.NameIP,
|
||||||
}
|
}
|
||||||
|
|
||||||
acc.WithWLock(func() {
|
acc.WithWLock(func() {
|
||||||
if err := acc.DeliverMailbox(log, mailbox, msg, msgFile); err != nil {
|
if err := acc.DeliverMailbox(log, mailbox, &msg, msgFile); err != nil {
|
||||||
qlog("delivering dsn to mailbox", err)
|
qlog("delivering dsn to mailbox", err)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
|
@ -325,7 +325,7 @@ Only implemented on unix systems, not Windows.
|
||||||
}
|
}
|
||||||
defer store.CloseRemoveTempFile(log, f, "message for changelog delivery")
|
defer store.CloseRemoveTempFile(log, f, "message for changelog delivery")
|
||||||
|
|
||||||
m := &store.Message{
|
m := store.Message{
|
||||||
Received: time.Now(),
|
Received: time.Now(),
|
||||||
Flags: store.Flags{Flagged: true},
|
Flags: store.Flags{Flagged: true},
|
||||||
}
|
}
|
||||||
|
@ -335,7 +335,7 @@ Only implemented on unix systems, not Windows.
|
||||||
return next
|
return next
|
||||||
}
|
}
|
||||||
m.Size = int64(n)
|
m.Size = int64(n)
|
||||||
if err := a.DeliverMailbox(log, mox.Conf.Static.Postmaster.Mailbox, m, f); err != nil {
|
if err := a.DeliverMailbox(log, mox.Conf.Static.Postmaster.Mailbox, &m, f); err != nil {
|
||||||
log.Errorx("changelog delivery", err)
|
log.Errorx("changelog delivery", err)
|
||||||
return next
|
return next
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue