Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
asyncmsg
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
atlas-tdaq-software
asyncmsg
Commits
204794de
Commit
204794de
authored
11 years ago
by
Tommaso Colombo
Browse files
Options
Downloads
Patches
Plain Diff
Error: rename SESSION_CLOSED to SESSION_NOT_OPEN for clarity
parent
a68f2a0a
No related branches found
No related tags found
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
asyncmsg/Error.h
+1
-1
1 addition, 1 deletion
asyncmsg/Error.h
src/Error.cxx
+2
-2
2 additions, 2 deletions
src/Error.cxx
src/Session.cxx
+3
-3
3 additions, 3 deletions
src/Session.cxx
src/UDPSession.cxx
+2
-2
2 additions, 2 deletions
src/UDPSession.cxx
with
8 additions
and
8 deletions
asyncmsg/Error.h
+
1
−
1
View file @
204794de
...
@@ -11,7 +11,7 @@ namespace asyncmsg
...
@@ -11,7 +11,7 @@ namespace asyncmsg
enum
class
Error
:
enum
class
Error
:
int
int
{
{
SESSION_
CLOSED
,
SESSION_
NOT_OPEN
,
SESSION_NOT_CLOSED
,
SESSION_NOT_CLOSED
,
RESERVED_MESSAGE_TYPE
,
RESERVED_MESSAGE_TYPE
,
UNEXPECTED_MESSAGE_TYPE
,
UNEXPECTED_MESSAGE_TYPE
,
...
...
This diff is collapsed.
Click to expand it.
src/Error.cxx
+
2
−
2
View file @
204794de
...
@@ -19,8 +19,8 @@ ErrorCategory ErrorCategory::s_instance;
...
@@ -19,8 +19,8 @@ ErrorCategory ErrorCategory::s_instance;
std
::
string
ErrorCategory
::
message
(
int
value
)
const
std
::
string
ErrorCategory
::
message
(
int
value
)
const
{
{
if
(
value
==
static_cast
<
int
>
(
Error
::
SESSION_
CLOSED
))
{
if
(
value
==
static_cast
<
int
>
(
Error
::
SESSION_
NOT_OPEN
))
{
return
"The session is
closed
"
;
return
"The session is
not open
"
;
}
}
if
(
value
==
static_cast
<
int
>
(
Error
::
SESSION_NOT_CLOSED
))
{
if
(
value
==
static_cast
<
int
>
(
Error
::
SESSION_NOT_CLOSED
))
{
return
"The session is not closed"
;
return
"The session is not closed"
;
...
...
This diff is collapsed.
Click to expand it.
src/Session.cxx
+
3
−
3
View file @
204794de
...
@@ -137,7 +137,7 @@ void Session::asyncClose()
...
@@ -137,7 +137,7 @@ void Session::asyncClose()
// use post to avoid stack overflows if the user calls asyncClose again from onCloseError()
// use post to avoid stack overflows if the user calls asyncClose again from onCloseError()
m_strand
.
post
(
m_strand
.
post
(
[
this
,
self
]
()
{
[
this
,
self
]
()
{
onCloseError
(
Error
::
SESSION_
CLOSED
);
onCloseError
(
Error
::
SESSION_
NOT_OPEN
);
});
});
}
}
else
{
else
{
...
@@ -169,7 +169,7 @@ void Session::asyncReceive()
...
@@ -169,7 +169,7 @@ void Session::asyncReceive()
// onReceiveError()
// onReceiveError()
m_strand
.
post
(
m_strand
.
post
(
[
this
,
self
]
()
{
[
this
,
self
]
()
{
onReceiveError
(
Error
::
SESSION_
CLOSED
,
std
::
unique_ptr
<
InputMessage
>
());
onReceiveError
(
Error
::
SESSION_
NOT_OPEN
,
std
::
unique_ptr
<
InputMessage
>
());
});
});
}
}
else
{
else
{
...
@@ -251,7 +251,7 @@ void Session::asyncSend(std::unique_ptr<const OutputMessage> message)
...
@@ -251,7 +251,7 @@ void Session::asyncSend(std::unique_ptr<const OutputMessage> message)
// use post to avoid stack overflows if the user calls asyncSend again from onSendError()
// use post to avoid stack overflows if the user calls asyncSend again from onSendError()
m_strand
.
post
(
m_strand
.
post
(
[
this
,
self
,
bareMessage
]
()
{
[
this
,
self
,
bareMessage
]
()
{
onSendError
(
Error
::
SESSION_
CLOSED
,
std
::
unique_ptr
<
const
OutputMessage
>
(
bareMessage
));
onSendError
(
Error
::
SESSION_
NOT_OPEN
,
std
::
unique_ptr
<
const
OutputMessage
>
(
bareMessage
));
});
});
}
}
else
if
(
bareMessage
->
typeId
()
>=
RESERVED_MESSAGE_TYPES_BASE
)
{
else
if
(
bareMessage
->
typeId
()
>=
RESERVED_MESSAGE_TYPES_BASE
)
{
...
...
This diff is collapsed.
Click to expand it.
src/UDPSession.cxx
+
2
−
2
View file @
204794de
...
@@ -57,7 +57,7 @@ void UDPSession::asyncReceive()
...
@@ -57,7 +57,7 @@ void UDPSession::asyncReceive()
// onReceiveError()
// onReceiveError()
m_strand
.
post
(
m_strand
.
post
(
[
this
,
self
]
()
{
[
this
,
self
]
()
{
onReceiveError
(
Error
::
SESSION_
CLOSED
,
std
::
unique_ptr
<
InputMessage
>
());
onReceiveError
(
Error
::
SESSION_
NOT_OPEN
,
std
::
unique_ptr
<
InputMessage
>
());
});
});
}
}
else
{
else
{
...
@@ -129,7 +129,7 @@ void UDPSession::asyncSend(std::unique_ptr<const OutputMessage> message)
...
@@ -129,7 +129,7 @@ void UDPSession::asyncSend(std::unique_ptr<const OutputMessage> message)
// use post to avoid stack overflows if the user calls asyncSend again from onSendError()
// use post to avoid stack overflows if the user calls asyncSend again from onSendError()
m_strand
.
post
(
m_strand
.
post
(
[
this
,
self
,
bareMessage
]
()
{
[
this
,
self
,
bareMessage
]
()
{
onSendError
(
Error
::
SESSION_
CLOSED
,
std
::
unique_ptr
<
const
OutputMessage
>
(
bareMessage
));
onSendError
(
Error
::
SESSION_
NOT_OPEN
,
std
::
unique_ptr
<
const
OutputMessage
>
(
bareMessage
));
});
});
}
}
else
if
(
bareMessage
->
typeId
()
>=
RESERVED_MESSAGE_TYPES_BASE
)
{
else
if
(
bareMessage
->
typeId
()
>=
RESERVED_MESSAGE_TYPES_BASE
)
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment