Tidy up exported/non-exported fields
This commit is contained in:
1 parent
a3cede3027
commit
8e2af9eec5
2 files changed
+7
-7
No files matched your search
@@ -26,7 +26,7 @@ var (
|
|||||||
type ResponseA struct {
|
type ResponseA struct {
|
||||||
Name string
|
Name string
|
||||||
Addr net.IP
|
Addr net.IP
|
||||||
err error
|
Err error
|
||||||
}
|
}
|
||||||
|
|
||||||
type responseInfo struct {
|
type responseInfo struct {
|
||||||
@@ -39,7 +39,7 @@ type responseInfo struct {
|
|||||||
// a query in flight, then we don't want to send more queries out.
|
// a query in flight, then we don't want to send more queries out.
|
||||||
type inflightQuery struct {
|
type inflightQuery struct {
|
||||||
name string
|
name string
|
||||||
Id uint16 // the DNS message ID
|
id uint16 // the DNS message ID
|
||||||
responseInfos []*responseInfo
|
responseInfos []*responseInfo
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -201,18 +201,18 @@ func (c *MDNSClient) handleSendQuery(q mDNSQueryInfo) error {
|
|||||||
m.RecursionDesired = false
|
m.RecursionDesired = false
|
||||||
buf, err := m.Pack()
|
buf, err := m.Pack()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
q.responseCh <- &ResponseA{err: err}
|
q.responseCh <- &ResponseA{Err: err}
|
||||||
close(q.responseCh)
|
close(q.responseCh)
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
query = &inflightQuery{
|
query = &inflightQuery{
|
||||||
name: q.name,
|
name: q.name,
|
||||||
Id: m.Id,
|
id: m.Id,
|
||||||
}
|
}
|
||||||
c.inflight[q.name] = query
|
c.inflight[q.name] = query
|
||||||
_, err = c.conn.WriteTo(buf, c.addr)
|
_, err = c.conn.WriteTo(buf, c.addr)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
q.responseCh <- &ResponseA{err: err}
|
q.responseCh <- &ResponseA{Err: err}
|
||||||
close(q.responseCh)
|
close(q.responseCh)
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -96,8 +96,8 @@ func (c *testContext) checkResponse(t *testing.T, channel_ok bool, resp *Respons
|
|||||||
c.channel = nil
|
c.channel = nil
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if resp.err != nil {
|
if resp.Err != nil {
|
||||||
t.Fatal(resp.err)
|
t.Fatal(resp.Err)
|
||||||
}
|
}
|
||||||
log.Printf("Got address response %s addr %s", resp.Name, resp.Addr)
|
log.Printf("Got address response %s addr %s", resp.Name, resp.Addr)
|
||||||
c.received_addr = resp.Addr
|
c.received_addr = resp.Addr
|
||||||
|
|||||||
Reference in new issue
Block a user