File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -20,6 +20,7 @@ import (
20
20
21
21
"github.com/blinklabs-io/gouroboros/connection"
22
22
"github.com/blinklabs-io/gouroboros/protocol"
23
+ "github.com/blinklabs-io/gouroboros/protocol/common"
23
24
)
24
25
25
26
// Protocol identifiers
@@ -128,11 +129,10 @@ type CallbackContext struct {
128
129
}
129
130
130
131
// Callback function types
131
- // TODO: update callbacks
132
- type AcquireFunc func (CallbackContext , interface {}) error
133
- type QueryFunc func (CallbackContext , interface {}) error
132
+ type AcquireFunc func (CallbackContext , * common.Point ) error
133
+ type QueryFunc func (CallbackContext , any ) error
134
134
type ReleaseFunc func (CallbackContext ) error
135
- type ReAcquireFunc func (CallbackContext , interface {} ) error
135
+ type ReAcquireFunc func (CallbackContext , * common. Point ) error
136
136
type DoneFunc func (CallbackContext ) error
137
137
138
138
// New returns a new LocalStateQuery object
Original file line number Diff line number Diff line change @@ -99,7 +99,7 @@ func (s *Server) handleAcquire(msg protocol.Message) error {
99
99
switch msgAcquire := msg .(type ) {
100
100
case * MsgAcquire :
101
101
// Call the user callback function
102
- return s .config .AcquireFunc (s .callbackContext , msgAcquire .Point )
102
+ return s .config .AcquireFunc (s .callbackContext , & msgAcquire .Point )
103
103
case * MsgAcquireNoPoint :
104
104
// Call the user callback function
105
105
return s .config .AcquireFunc (s .callbackContext , nil )
@@ -137,7 +137,7 @@ func (s *Server) handleReAcquire(msg protocol.Message) error {
137
137
switch msgReAcquire := msg .(type ) {
138
138
case * MsgReAcquire :
139
139
// Call the user callback function
140
- return s .config .ReAcquireFunc (s .callbackContext , msgReAcquire .Point )
140
+ return s .config .ReAcquireFunc (s .callbackContext , & msgReAcquire .Point )
141
141
case * MsgReAcquireNoPoint :
142
142
// Call the user callback function
143
143
return s .config .ReAcquireFunc (s .callbackContext , nil )
You can’t perform that action at this time.
0 commit comments