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
Labels
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
Kirill Smelkov
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
Hide 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) {
continue
;
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
)
return
E
(
err
);
if
(
ack
!=
"ok"
)
{
...
...
@@ -695,7 +696,7 @@ retry:
wconn
.
_filehMu
.
Unlock
();
// 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
();
if
(
f
->
_openErr
!=
nil
)
return
make_pair
(
nil
,
E
(
f
->
_openErr
));
...
...
@@ -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 wcfs will reply "ok" only after wcfs/head/at ≥ wconn.at
string
ack
;
// XXX f._watchMu.lock() + unlock ?
// XXX + recheck status before sending the watch?
tie
(
ack
,
err
)
=
wconn
->
_wlink
->
sendReq
(
context
::
background
(),
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
)
return
err
;
if
(
ack
!=
"ok"
)
...
...
@@ -799,7 +799,8 @@ error _FileH::close() {
// stop watching f
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
)
reterr1
(
err
);
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