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
2a4ad58d
Commit
2a4ad58d
authored
Mar 09, 2020
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
e0f03507
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
4 deletions
+8
-4
wcfs/client/wcfs_watchlink.cpp
wcfs/client/wcfs_watchlink.cpp
+8
-4
No files found.
wcfs/client/wcfs_watchlink.cpp
View file @
2a4ad58d
...
...
@@ -153,12 +153,14 @@ error _WatchLink::_serveRX(context::Context ctx) {
//printf("pkt.datalen: %u\n", pkt.datalen);
if
(
pkt
.
stream
==
0
)
{
// control/fatal message from wcfs
log
::
Warn
f
(
"C: watch : rx fatal: %s
\n
"
,
v
(
l
));
log
::
Error
f
(
"C: watch : rx fatal: %s
\n
"
,
v
(
l
));
wlink
.
fatalv
.
push_back
(
pkt
.
to_string
());
continue
;
}
bool
reply
=
(
pkt
.
stream
%
2
!=
0
);
// wcfs replies to our request
if
(
reply
)
{
chan
<
rxPkt
>
rxq
;
bool
ok
;
...
...
@@ -168,9 +170,9 @@ error _WatchLink::_serveRX(context::Context ctx) {
wlink
.
_rxmu
.
unlock
();
if
(
!
ok
)
{
// wcfs sent reply on unexpected stream
// XXX
log +
down.
printf
(
"wcfs sent reply on unexpected stream
\n
"
);
continue
;
// XXX down.
log
::
Errorf
(
"%s: wcfs sent reply on unexpected stream %lu"
,
v
(
wlink
),
pkt
.
stream
);
continue
;
// XXX -> down
}
int
_
=
select
({
ctx
->
done
().
recvs
(),
// 0
...
...
@@ -180,6 +182,8 @@ error _WatchLink::_serveRX(context::Context ctx) {
if
(
_
==
0
)
return
E
(
ctx
->
err
());
}
// wcfs originated request
else
{
wlink
.
_rxmu
.
lock
();
if
(
wlink
.
_accepted
.
has
(
pkt
.
stream
))
{
...
...
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