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
e783f02d
Commit
e783f02d
authored
Mar 02, 2020
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
6fc36ed0
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
6 deletions
+7
-6
wcfs/client/wcfs.cpp
wcfs/client/wcfs.cpp
+7
-6
No files found.
wcfs/client/wcfs.cpp
View file @
e783f02d
...
@@ -597,7 +597,8 @@ error _Conn::resync(zodb::Tid at) {
...
@@ -597,7 +597,8 @@ error _Conn::resync(zodb::Tid at) {
continue
;
continue
;
string
ack
;
string
ack
;
tie
(
ack
,
err
)
=
wconn
.
_wlink
->
sendReq
(
context
::
background
(),
fmt
::
sprintf
(
"watch %s @%s"
,
v
(
foid
),
v
(
at
)));
tie
(
ack
,
err
)
=
wconn
.
_wlink
->
sendReq
(
context
::
background
(),
fmt
::
sprintf
(
"watch %s @%s"
,
v
(
foid
),
v
(
at
)));
if
(
err
!=
nil
)
if
(
err
!=
nil
)
return
E
(
err
);
return
E
(
err
);
if
(
ack
!=
"ok"
)
{
if
(
ack
!=
"ok"
)
{
...
@@ -695,7 +696,7 @@ retry:
...
@@ -695,7 +696,7 @@ retry:
wconn
.
_filehMu
.
Unlock
();
wconn
.
_filehMu
.
Unlock
();
// do the actuall open.
// do the actuall open.
//
We hold only wconn.atMu.R, but not
wconn.filehMu, nor f.mu .
//
we hold only wconn.atMu.R, but niether
wconn.filehMu, nor f.mu .
f
->
_openErr
=
f
->
_open
();
f
->
_openErr
=
f
->
_open
();
if
(
f
->
_openErr
!=
nil
)
if
(
f
->
_openErr
!=
nil
)
return
make_pair
(
nil
,
E
(
f
->
_openErr
));
return
make_pair
(
nil
,
E
(
f
->
_openErr
));
...
@@ -740,9 +741,8 @@ error _FileH::_open() {
...
@@ -740,9 +741,8 @@ error _FileH::_open() {
// NOTE we are _not_ holding wconn.filehMu nor f.mu - only wconn.atMu to rely on wconn.at being stable.
// NOTE we are _not_ holding wconn.filehMu nor f.mu - only wconn.atMu to rely on wconn.at being stable.
// NOTE wcfs will reply "ok" only after wcfs/head/at ≥ wconn.at
// NOTE wcfs will reply "ok" only after wcfs/head/at ≥ wconn.at
string
ack
;
string
ack
;
// XXX f._watchMu.lock() + unlock ?
tie
(
ack
,
err
)
=
wconn
->
_wlink
->
sendReq
(
context
::
background
(),
// XXX + recheck status before sending the watch?
fmt
::
sprintf
(
"watch %s @%s"
,
v
(
foid
),
v
(
wconn
->
at
)));
tie
(
ack
,
err
)
=
wconn
->
_wlink
->
sendReq
(
context
::
background
(),
fmt
::
sprintf
(
"watch %s @%s"
,
v
(
foid
),
v
(
wconn
->
at
)));
if
(
err
!=
nil
)
if
(
err
!=
nil
)
return
err
;
return
err
;
if
(
ack
!=
"ok"
)
if
(
ack
!=
"ok"
)
...
@@ -799,7 +799,8 @@ error _FileH::close() {
...
@@ -799,7 +799,8 @@ error _FileH::close() {
// stop watching f
// stop watching f
string
ack
;
string
ack
;
tie
(
ack
,
err
)
=
wconn
->
_wlink
->
sendReq
(
context
::
background
(),
fmt
::
sprintf
(
"watch %s -"
,
v
(
foid
)));
tie
(
ack
,
err
)
=
wconn
->
_wlink
->
sendReq
(
context
::
background
(),
fmt
::
sprintf
(
"watch %s -"
,
v
(
foid
)));
if
(
err
!=
nil
)
if
(
err
!=
nil
)
reterr1
(
err
);
reterr1
(
err
);
else
if
(
ack
!=
"ok"
)
else
if
(
ack
!=
"ok"
)
...
...
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