]> Cypherpunks.ru repositories - nncp.git/commitdiff
Slightly more debug
authorSergey Matveev <stargrave@stargrave.org>
Fri, 9 Jul 2021 11:39:47 +0000 (14:39 +0300)
committerSergey Matveev <stargrave@stargrave.org>
Fri, 9 Jul 2021 12:19:43 +0000 (15:19 +0300)
src/sp.go

index 0e33c06f769f71a704a80889fd5cec173de103bf..84d74bbc4ab629def551545511557ab54183b5eb 100644 (file)
--- a/src/sp.go
+++ b/src/sp.go
@@ -875,6 +875,9 @@ func (state *SPState) StartWorkers(
                                fdAndFullSize, exists := state.fds[pth]
                                state.fdsLock.RUnlock()
                                if !exists {
+                                       state.Ctx.LogD("sp-queue-open", lesp, func(les LEs) string {
+                                               return logMsg(les) + ": opening"
+                                       })
                                        fd, err := os.Open(pth)
                                        if err != nil {
                                                state.Ctx.LogE("sp-queue-open", lesp, err, func(les LEs) string {
@@ -896,6 +899,7 @@ func (state *SPState) StartWorkers(
                                }
                                fd := fdAndFullSize.fd
                                fullSize := fdAndFullSize.fullSize
+                               lesp = append(lesp, LE{"FullSize", fullSize})
                                var bufRead []byte
                                if freq.Offset < uint64(fullSize) {
                                        state.Ctx.LogD("sp-file-seek", lesp, func(les LEs) string {
@@ -920,6 +924,7 @@ func (state *SPState) StartWorkers(
                                                LE{"XX", string(TTx)},
                                                LE{"Pkt", pktName},
                                                LE{"Size", int64(n)},
+                                               LE{"FullSize", fullSize},
                                        )
                                        state.Ctx.LogD("sp-file-read", lesp, func(les LEs) string {
                                                return fmt.Sprintf(