Payload data has now moved onto Pin struct.

This commit is contained in:
Alan Noble 2018-06-16 19:04:32 +09:30
parent 4c0d219fbf
commit 05c6c376b4
2 changed files with 5 additions and 7 deletions

View File

@ -310,7 +310,7 @@ func sendTo(ns *netsender.Sender) error {
}
}
_, reconfig, err := ns.Send(netsender.RequestPoll, inputs, nil)
_, reconfig, err := ns.Send(netsender.RequestPoll, inputs)
if err != nil {
return err
}

View File

@ -133,13 +133,11 @@ func (s *httpSender) load(c *ring.Chunk) error {
}
func (s *httpSender) send() error {
pins := netsender.MakePins("V0","")
pins := netsender.MakePins("V0", "")
pins[0].Value = len(s.buf)
var payload netsender.Payload
payload.Name = "V0"
payload.Data = s.buf
payload.MimeType = "video/mp2t"
_, _, err := s.client.Send(netsender.RequestPoll, pins, &payload)
pins[0].Data = s.buf
pins[0].MimeType = "video/mp2t"
_, _, err := s.client.Send(netsender.RequestPoll, pins)
if err != nil {
return err
}