]> Cypherpunks.ru repositories - nncp.git/blobdiff - src/cypherpunks.ru/nncp/cmd/nncp-daemon/main.go
Ability to configure online deadline timeout
[nncp.git] / src / cypherpunks.ru / nncp / cmd / nncp-daemon / main.go
index 890c823e0278b0d51d89e39a7e8a72dedc4fe3d8..c1355c8a1a0be90e0aaa9436b3cbca8e78b7bbb0 100644 (file)
@@ -90,10 +90,10 @@ func main() {
                go func(conn net.Conn) {
                        state, err := ctx.StartR(conn, nice, nil)
                        if err == nil {
-                               ctx.LogI("call-start", nncp.SDS{"node": state.NodeId}, "connected")
+                               ctx.LogI("call-start", nncp.SDS{"node": state.Node.Id}, "connected")
                                state.Wait()
                                ctx.LogI("call-finish", nncp.SDS{
-                                       "node":     state.NodeId,
+                                       "node":     state.Node.Id,
                                        "duration": strconv.FormatInt(int64(state.Duration.Seconds()), 10),
                                        "rxbytes":  strconv.FormatInt(state.RxBytes, 10),
                                        "txbytes":  strconv.FormatInt(state.TxBytes, 10),
@@ -102,8 +102,8 @@ func main() {
                                }, "")
                        } else {
                                nodeId := "unknown"
-                               if state != nil && state.NodeId != nil {
-                                       nodeId = state.NodeId.String()
+                               if state != nil && state.Node != nil {
+                                       nodeId = state.Node.Id.String()
                                }
                                ctx.LogE("call-start", nncp.SDS{"node": nodeId, "err": err}, "")
                        }