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
9b2efcc7
Commit
9b2efcc7
authored
Mar 10, 2020
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
1b236e16
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
13 deletions
+13
-13
wcfs/client/wcfs_watchlink.cpp
wcfs/client/wcfs_watchlink.cpp
+13
-13
No files found.
wcfs/client/wcfs_watchlink.cpp
View file @
9b2efcc7
...
...
@@ -289,30 +289,30 @@ StreamID _WatchLink::_nextReqID() {
}
tuple
<
/*rxq*/
chan
<
rxPkt
>
,
error
>
_WatchLink
::
_sendReq
(
context
::
Context
ctx
,
const
string
&
req
)
{
_WatchLink
*
wlink
=
this
;
_WatchLink
&
wlink
=
*
this
;
// XXX errctx?
StreamID
stream
=
wlink
->
_nextReqID
();
StreamID
stream
=
wlink
.
_nextReqID
();
auto
rxq
=
makechan
<
rxPkt
>
(
1
);
wlink
->
_rxmu
.
lock
();
if
(
wlink
->
_rxdown
)
{
wlink
->
_rxmu
.
unlock
();
wlink
.
_rxmu
.
lock
();
if
(
wlink
.
_rxdown
)
{
wlink
.
_rxmu
.
unlock
();
return
make_tuple
(
nil
,
ErrLinkDown
);
}
if
(
wlink
->
_rxtab
.
has
(
stream
))
{
wlink
->
_rxmu
.
unlock
();
if
(
wlink
.
_rxtab
.
has
(
stream
))
{
wlink
.
_rxmu
.
unlock
();
panic
(
"BUG: to-be-sent stream is present in rxtab"
);
}
wlink
->
_rxtab
[
stream
]
=
rxq
;
wlink
->
_rxmu
.
unlock
();
wlink
.
_rxtab
[
stream
]
=
rxq
;
wlink
.
_rxmu
.
unlock
();
error
err
=
wlink
->
_send
(
stream
,
req
);
error
err
=
wlink
.
_send
(
stream
,
req
);
if
(
err
!=
nil
)
{
// remove rxq from rxtab
wlink
->
_rxmu
.
lock
();
wlink
->
_rxtab
.
erase
(
stream
);
wlink
->
_rxmu
.
unlock
();
wlink
.
_rxmu
.
lock
();
wlink
.
_rxtab
.
erase
(
stream
);
wlink
.
_rxmu
.
unlock
();
// no need to drain rxq - it was created with cap=1
rxq
=
nil
;
...
...
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