Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
W
wendelin.core
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Joshua
wendelin.core
Commits
16371832
Commit
16371832
authored
Jun 05, 2019
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
37238244
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
11 deletions
+12
-11
wcfs/wcfs.go
wcfs/wcfs.go
+10
-9
wcfs/wcfs_test.py
wcfs/wcfs_test.py
+2
-2
No files found.
wcfs/wcfs.go
View file @
16371832
...
...
@@ -1593,23 +1593,24 @@ func (wlink *WatchLink) _serveRX() (err error) {
func
(
wlink
*
WatchLink
)
handleWatch
(
ctx
context
.
Context
,
stream
uint64
,
msg
string
)
(
err
error
)
{
defer
xerr
.
Contextf
(
&
err
,
"%d"
,
stream
)
foid
,
at
,
err
:=
parseWatch
(
msg
)
err
=
wlink
.
_handleWatch
(
ctx
,
msg
)
reply
:=
"ok"
if
err
!=
nil
{
re
turn
err
re
ply
=
fmt
.
Sprintf
(
"error %s"
,
err
)
}
err
=
wlink
.
setupWatch
(
ctx
,
foid
,
at
)
if
err
!=
nil
{
fmt
.
Printf
(
"S: watch: QQQ: %s
\n
"
,
err
)
return
err
}
err
=
wlink
.
send
(
ctx
,
stream
,
reply
)
return
err
}
err
=
wlink
.
send
(
ctx
,
stream
,
"ok"
)
func
(
wlink
*
WatchLink
)
_handleWatch
(
ctx
context
.
Context
,
msg
string
)
error
{
foid
,
at
,
err
:=
parseWatch
(
msg
)
if
err
!=
nil
{
return
err
}
return
nil
err
=
wlink
.
setupWatch
(
ctx
,
foid
,
at
)
return
err
}
// sendReq sends wcfs-originated request to client and returns client response.
...
...
wcfs/wcfs_test.py
View file @
16371832
...
...
@@ -876,9 +876,9 @@ def test_wcfs():
# XXX invalid requests -> wcfs replies error
# XXX -> separate test?
wl
=
t
.
openwatch
()
assert
wl
.
sendReq
(
context
.
background
(),
b'bla bla'
)
==
""
# XXX -> == None XXX or error?
assert
wl
.
sendReq
(
context
.
background
(),
b'bla bla'
)
==
b"error bad watch: not a watch request"
# assert wl closed
#
XXX
assert wl closed
wl
.
close
()
for
zf
in
t
.
zfiles
():
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment