Commit dac44ea0 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent 66dc4f18
...@@ -1460,6 +1460,8 @@ func (wlink *WatchLink) _serveRX() (err error) { ...@@ -1460,6 +1460,8 @@ func (wlink *WatchLink) _serveRX() (err error) {
// XXX close .sk on error/wcfs stopping // XXX close .sk on error/wcfs stopping
ctx := context.TODO() // XXX ctx = ? -> ctx of wcfs running
// XXX write to peer if it was logical error on client side // XXX write to peer if it was logical error on client side
// XXX on which stream? -1? // XXX on which stream? -1?
...@@ -1492,7 +1494,7 @@ func (wlink *WatchLink) _serveRX() (err error) { ...@@ -1492,7 +1494,7 @@ func (wlink *WatchLink) _serveRX() (err error) {
} }
// client-initiated watch request // client-initiated watch request
err = wlink.handleWatch(stream, msg) err = wlink.handleWatch(ctx, stream, msg)
if err != nil { if err != nil {
panic(err) // XXX panic(err) // XXX
} }
...@@ -1502,7 +1504,7 @@ func (wlink *WatchLink) _serveRX() (err error) { ...@@ -1502,7 +1504,7 @@ func (wlink *WatchLink) _serveRX() (err error) {
// handleWatch handles watch request from client. // handleWatch handles watch request from client.
// //
// returned error comes without full error prefix. // returned error comes without full error prefix.
func (wlink *WatchLink) handleWatch(stream uint64, msg string) (err error) { func (wlink *WatchLink) handleWatch(ctx context.Context, stream uint64, msg string) (err error) {
defer xerr.Contextf(&err, "%d", stream) defer xerr.Contextf(&err, "%d", stream)
foid, at, err := parseWatch(msg) foid, at, err := parseWatch(msg)
...@@ -1510,8 +1512,6 @@ func (wlink *WatchLink) handleWatch(stream uint64, msg string) (err error) { ...@@ -1510,8 +1512,6 @@ func (wlink *WatchLink) handleWatch(stream uint64, msg string) (err error) {
return err return err
} }
ctx := context.TODO() // XXX ctx = ?
fmt.Printf("S: watch: AAA\n") fmt.Printf("S: watch: AAA\n")
err = wlink.setupWatch(ctx, foid, at) err = wlink.setupWatch(ctx, foid, at)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment