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
cc6e57db
Commit
cc6e57db
authored
Mar 10, 2020
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
2e607276
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
7 deletions
+5
-7
wcfs/client/wcfs_watchlink.cpp
wcfs/client/wcfs_watchlink.cpp
+4
-6
wcfs/client/wcfs_watchlink.h
wcfs/client/wcfs_watchlink.h
+1
-1
No files found.
wcfs/client/wcfs_watchlink.cpp
View file @
cc6e57db
...
@@ -267,12 +267,13 @@ error _WatchLink::replyReq(context::Context ctx, const PinReq *req, const string
...
@@ -267,12 +267,13 @@ error _WatchLink::replyReq(context::Context ctx, const PinReq *req, const string
// sendReq sends client -> server request and returns server reply.
// sendReq sends client -> server request and returns server reply.
pair
<
/*reply*/
string
,
error
>
_WatchLink
::
sendReq
(
context
::
Context
ctx
,
const
string
&
req
)
{
pair
<
/*reply*/
string
,
error
>
_WatchLink
::
sendReq
(
context
::
Context
ctx
,
const
string
&
req
)
{
_WatchLink
&
wlink
=
*
this
;
_WatchLink
&
wlink
=
*
this
;
xerr
::
Contextf
E
(
"%s: sendReq"
,
v
(
wlink
));
// XXX + streamID
StreamID
stream
=
wlink
.
_nextReqID
();
xerr
::
Contextf
E
(
"%s: sendReq .%d"
,
v
(
wlink
),
stream
);
rxPkt
rx
;
bool
ok
;
rxPkt
rx
;
bool
ok
;
chan
<
rxPkt
>
rxq
;
chan
<
rxPkt
>
rxq
;
error
err
;
error
err
;
tie
(
rxq
,
err
)
=
wlink
.
_sendReq
(
ctx
,
req
);
tie
(
rxq
,
err
)
=
wlink
.
_sendReq
(
ctx
,
stream
,
req
);
if
(
err
!=
nil
)
if
(
err
!=
nil
)
return
make_pair
(
""
,
E
(
err
));
return
make_pair
(
""
,
E
(
err
));
...
@@ -289,11 +290,8 @@ pair</*reply*/string, error> _WatchLink::sendReq(context::Context ctx, const str
...
@@ -289,11 +290,8 @@ pair</*reply*/string, error> _WatchLink::sendReq(context::Context ctx, const str
return
make_pair
(
reply
,
nil
);
return
make_pair
(
reply
,
nil
);
}
}
tuple
<
/*rxq*/
chan
<
rxPkt
>
,
error
>
_WatchLink
::
_sendReq
(
context
::
Context
ctx
,
const
string
&
req
)
{
tuple
<
/*rxq*/
chan
<
rxPkt
>
,
error
>
_WatchLink
::
_sendReq
(
context
::
Context
ctx
,
StreamID
stream
,
const
string
&
req
)
{
_WatchLink
&
wlink
=
*
this
;
_WatchLink
&
wlink
=
*
this
;
// XXX errctx?
StreamID
stream
=
wlink
.
_nextReqID
();
auto
rxq
=
makechan
<
rxPkt
>
(
1
);
auto
rxq
=
makechan
<
rxPkt
>
(
1
);
wlink
.
_rxmu
.
lock
();
wlink
.
_rxmu
.
lock
();
...
...
wcfs/client/wcfs_watchlink.h
View file @
cc6e57db
...
@@ -119,7 +119,7 @@ private:
...
@@ -119,7 +119,7 @@ private:
error
_send
(
StreamID
stream
,
const
string
&
msg
);
error
_send
(
StreamID
stream
,
const
string
&
msg
);
error
_write
(
const
string
&
pkt
);
error
_write
(
const
string
&
pkt
);
StreamID
_nextReqID
();
StreamID
_nextReqID
();
tuple
<
chan
<
rxPkt
>
,
error
>
_sendReq
(
context
::
Context
ctx
,
const
string
&
req
);
tuple
<
chan
<
rxPkt
>
,
error
>
_sendReq
(
context
::
Context
ctx
,
StreamID
stream
,
const
string
&
req
);
friend
error
_twlinkwrite
(
WatchLink
wlink
,
const
string
&
pkt
);
friend
error
_twlinkwrite
(
WatchLink
wlink
,
const
string
&
pkt
);
};
};
...
...
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