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
0b9cfeb2
Commit
0b9cfeb2
authored
Mar 10, 2020
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
cc6e57db
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
7 deletions
+7
-7
wcfs/client/wcfs_watchlink.cpp
wcfs/client/wcfs_watchlink.cpp
+7
-7
No files found.
wcfs/client/wcfs_watchlink.cpp
View file @
0b9cfeb2
...
@@ -164,7 +164,7 @@ error _WatchLink::_serveRX(context::Context ctx) {
...
@@ -164,7 +164,7 @@ error _WatchLink::_serveRX(context::Context ctx) {
if
(
pkt
.
stream
==
0
)
{
// control/fatal message from wcfs
if
(
pkt
.
stream
==
0
)
{
// control/fatal message from wcfs
log
::
Errorf
(
"C: watch : rx fatal: %s
\n
"
,
v
(
l
));
log
::
Errorf
(
"C: watch : rx fatal: %s
\n
"
,
v
(
l
));
wlink
.
fatalv
.
push_back
(
pkt
.
to_string
());
wlink
.
fatalv
.
push_back
(
pkt
.
to_string
());
continue
;
continue
;
// XXX -> shutdown ?
}
}
bool
reply
=
(
pkt
.
stream
%
2
!=
0
);
bool
reply
=
(
pkt
.
stream
%
2
!=
0
);
...
@@ -178,10 +178,10 @@ error _WatchLink::_serveRX(context::Context ctx) {
...
@@ -178,10 +178,10 @@ error _WatchLink::_serveRX(context::Context ctx) {
tie
(
rxq
,
ok
)
=
wlink
.
_rxtab
.
pop_
(
pkt
.
stream
);
tie
(
rxq
,
ok
)
=
wlink
.
_rxtab
.
pop_
(
pkt
.
stream
);
wlink
.
_rxmu
.
unlock
();
wlink
.
_rxmu
.
unlock
();
if
(
!
ok
)
{
if
(
!
ok
)
{
// wcfs sent reply on unexpected stream
// wcfs sent reply on unexpected stream
-> shutdown wlink.
// XXX down.
// XXX down.
log
::
Errorf
(
"%s:
wcfs sent reply on unexpected stream %lu
"
,
v
(
wlink
),
pkt
.
stream
);
log
::
Errorf
(
"%s:
.%lu: wcfs sent reply on unexpected stream
"
,
v
(
wlink
),
pkt
.
stream
);
continue
;
// XXX -> down
return
XXX
;
}
}
int
_
=
select
({
int
_
=
select
({
ctx
->
done
().
recvs
(),
// 0
ctx
->
done
().
recvs
(),
// 0
...
@@ -198,10 +198,10 @@ error _WatchLink::_serveRX(context::Context ctx) {
...
@@ -198,10 +198,10 @@ error _WatchLink::_serveRX(context::Context ctx) {
if
(
wlink
.
_accepted
.
has
(
pkt
.
stream
))
{
if
(
wlink
.
_accepted
.
has
(
pkt
.
stream
))
{
wlink
.
_rxmu
.
unlock
();
wlink
.
_rxmu
.
unlock
();
// XXX log + down
// XXX log + down
printf
(
"
wcfs sent request on already used stream
\n
"
);
printf
(
"
%s: .%lu: wcfs sent request on already used stream"
,
v
(
wlink
),
pkt
.
stream
);
continue
;
continue
;
// XXX -> return
}
}
// XXX clear _accepted not to leak memory after reply is sent
?
// XXX clear _accepted not to leak memory after reply is sent
wlink
.
_accepted
.
insert
(
pkt
.
stream
);
wlink
.
_accepted
.
insert
(
pkt
.
stream
);
wlink
.
_rxmu
.
unlock
();
wlink
.
_rxmu
.
unlock
();
int
_
=
select
({
int
_
=
select
({
...
...
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