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
3c43bcbf
Commit
3c43bcbf
authored
Mar 10, 2020
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
9b2efcc7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
9 deletions
+9
-9
wcfs/client/wcfs_watchlink.cpp
wcfs/client/wcfs_watchlink.cpp
+9
-9
No files found.
wcfs/client/wcfs_watchlink.cpp
View file @
3c43bcbf
...
...
@@ -323,23 +323,23 @@ tuple</*rxq*/chan<rxPkt>, error> _WatchLink::_sendReq(context::Context ctx, cons
// replyReq sends reply to client <- server request received by recvReq.
error
_WatchLink
::
replyReq
(
context
::
Context
ctx
,
const
PinReq
*
req
,
const
string
&
answer
)
{
_WatchLink
*
wlink
=
this
;
_WatchLink
&
wlink
=
*
this
;
xerr
::
Contextf
E
(
"%s: replyReq .%d"
,
v
(
wlink
),
req
->
stream
);
//print('C: reply %s <- %r ...' % (req, answer))
wlink
->
_rxmu
.
lock
();
bool
ok
=
wlink
->
_accepted
.
has
(
req
->
stream
);
wlink
->
_rxmu
.
unlock
();
wlink
.
_rxmu
.
lock
();
bool
ok
=
wlink
.
_accepted
.
has
(
req
->
stream
);
wlink
.
_rxmu
.
unlock
();
if
(
!
ok
)
panic
(
"reply to not accepted stream"
);
error
err
=
wlink
->
_send
(
req
->
stream
,
answer
);
error
err
=
wlink
.
_send
(
req
->
stream
,
answer
);
wlink
->
_rxmu
.
lock
();
ok
=
wlink
->
_accepted
.
has
(
req
->
stream
);
wlink
.
_rxmu
.
lock
();
ok
=
wlink
.
_accepted
.
has
(
req
->
stream
);
if
(
ok
)
wlink
->
_accepted
.
erase
(
req
->
stream
);
wlink
->
_rxmu
.
unlock
();
wlink
.
_accepted
.
erase
(
req
->
stream
);
wlink
.
_rxmu
.
unlock
();
if
(
!
ok
)
panic
(
"BUG: stream vanished from wlink._accepted while reply was in progress"
);
...
...
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