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
Labels
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
Kirill Smelkov
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
Show 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) {
...
@@ -153,12 +153,14 @@ error _WatchLink::_serveRX(context::Context ctx) {
//printf("pkt.datalen: %u\n", pkt.datalen);
//printf("pkt.datalen: %u\n", pkt.datalen);
if
(
pkt
.
stream
==
0
)
{
// control/fatal message from wcfs
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
());
wlink
.
fatalv
.
push_back
(
pkt
.
to_string
());
continue
;
continue
;
}
}
bool
reply
=
(
pkt
.
stream
%
2
!=
0
);
bool
reply
=
(
pkt
.
stream
%
2
!=
0
);
// wcfs replies to our request
if
(
reply
)
{
if
(
reply
)
{
chan
<
rxPkt
>
rxq
;
chan
<
rxPkt
>
rxq
;
bool
ok
;
bool
ok
;
...
@@ -168,9 +170,9 @@ error _WatchLink::_serveRX(context::Context ctx) {
...
@@ -168,9 +170,9 @@ error _WatchLink::_serveRX(context::Context ctx) {
wlink
.
_rxmu
.
unlock
();
wlink
.
_rxmu
.
unlock
();
if
(
!
ok
)
{
if
(
!
ok
)
{
// wcfs sent reply on unexpected stream
// wcfs sent reply on unexpected stream
// XXX
log +
down.
// XXX down.
printf
(
"wcfs sent reply on unexpected stream
\n
"
);
log
::
Errorf
(
"%s: wcfs sent reply on unexpected stream %lu"
,
v
(
wlink
),
pkt
.
stream
);
continue
;
continue
;
// XXX -> down
}
}
int
_
=
select
({
int
_
=
select
({
ctx
->
done
().
recvs
(),
// 0
ctx
->
done
().
recvs
(),
// 0
...
@@ -180,6 +182,8 @@ error _WatchLink::_serveRX(context::Context ctx) {
...
@@ -180,6 +182,8 @@ error _WatchLink::_serveRX(context::Context ctx) {
if
(
_
==
0
)
if
(
_
==
0
)
return
E
(
ctx
->
err
());
return
E
(
ctx
->
err
());
}
}
// wcfs originated request
else
{
else
{
wlink
.
_rxmu
.
lock
();
wlink
.
_rxmu
.
lock
();
if
(
wlink
.
_accepted
.
has
(
pkt
.
stream
))
{
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