Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mpd
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Иван Мажукин
mpd
Commits
ab4bb26a
Commit
ab4bb26a
authored
Dec 14, 2014
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lib/nfs/Connection: make in_service and in_event debug-only flags
parent
4b8d258c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
0 deletions
+11
-0
Connection.cxx
src/lib/nfs/Connection.cxx
+9
-0
Connection.hxx
src/lib/nfs/Connection.hxx
+2
-0
No files found.
src/lib/nfs/Connection.cxx
View file @
ab4bb26a
...
...
@@ -407,17 +407,21 @@ NfsConnection::OnSocketReady(unsigned flags)
re-register it each time */
SocketMonitor
::
Steal
();
#ifndef NDEBUG
assert
(
!
in_event
);
in_event
=
true
;
assert
(
!
in_service
);
in_service
=
true
;
#endif
int
result
=
nfs_service
(
context
,
events_to_libnfs
(
flags
));
#ifndef NDEBUG
assert
(
context
!=
nullptr
);
assert
(
in_service
);
in_service
=
false
;
#endif
while
(
!
deferred_close
.
empty
())
{
nfs_close_async
(
context
,
deferred_close
.
front
(),
...
...
@@ -460,8 +464,10 @@ NfsConnection::OnSocketReady(unsigned flags)
closed
=
true
;
}
#ifndef NDEBUG
assert
(
in_event
);
in_event
=
false
;
#endif
if
(
context
!=
nullptr
)
ScheduleSocket
();
...
...
@@ -509,8 +515,11 @@ NfsConnection::MountInternal(Error &error)
postponed_mount_error
.
Clear
();
mount_finished
=
false
;
#ifndef NDEBUG
in_service
=
false
;
in_event
=
false
;
#endif
if
(
nfs_mount_async
(
context
,
server
.
c_str
(),
export_name
.
c_str
(),
MountCallback
,
this
)
!=
0
)
{
...
...
src/lib/nfs/Connection.hxx
View file @
ab4bb26a
...
...
@@ -111,6 +111,7 @@ class NfsConnection : SocketMonitor, DeferredMonitor {
Error
postponed_mount_error
;
#ifndef NDEBUG
/**
* True when nfs_service() is being called.
*/
...
...
@@ -121,6 +122,7 @@ class NfsConnection : SocketMonitor, DeferredMonitor {
* event updates are omitted.
*/
bool
in_event
;
#endif
bool
mount_finished
;
...
...
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