Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
rt-UA
open62541
Commits
fbd65fc3
Commit
fbd65fc3
authored
5 years ago
by
Julius Pfrommer
Committed by
Julius Pfrommer
5 years ago
Browse files
Options
Download
Email Patches
Plain Diff
feat(server): Give subscription logs a higher urgency
parent
5625d1d2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/server/ua_subscription.c
+12
-12
src/server/ua_subscription.c
with
12 additions
and
12 deletions
+12
-12
src/server/ua_subscription.c
View file @
fbd65fc3
...
...
@@ -130,10 +130,10 @@ detectValueChange(UA_MonitoredItem *mon, UA_DataValue *value,
void
UA_MoniteredItem_SampleCallback
(
UA_Server
*
server
,
UA_MonitoredItem
*
monitoredItem
)
{
UA_Subscription
*
sub
=
monitoredItem
->
subscription
;
if
(
monitoredItem
->
monitoredItemType
!=
UA_MONITOREDITEMTYPE_CHANGENOTIFY
)
{
UA_LOG_
DEBU
G_SESSION
(
server
->
config
.
logger
,
sub
->
session
,
"Subscription %u | MonitoredItem %i | "
"Not a data change notification"
,
sub
->
subscriptionID
,
monitoredItem
->
itemId
);
UA_LOG_
WARNIN
G_SESSION
(
server
->
config
.
logger
,
sub
->
session
,
"Subscription %u | MonitoredItem %i | "
"Not a data change notification"
,
sub
->
subscriptionID
,
monitoredItem
->
itemId
);
return
;
}
...
...
@@ -428,9 +428,9 @@ void UA_Subscription_publishCallback(UA_Server *server, UA_Subscription *sub) {
++
sub
->
currentKeepAliveCount
;
if
(
sub
->
currentKeepAliveCount
<
sub
->
maxKeepAliveCount
)
return
;
UA_LOG_
DEBUG
_SESSION
(
server
->
config
.
logger
,
sub
->
session
,
"Subscription %u | Sending a KeepAlive"
,
sub
->
subscriptionID
)
UA_LOG_
INFO
_SESSION
(
server
->
config
.
logger
,
sub
->
session
,
"Subscription %u | Sending a KeepAlive"
,
sub
->
subscriptionID
)
}
/* Check if the securechannel is valid */
...
...
@@ -443,16 +443,16 @@ void UA_Subscription_publishCallback(UA_Server *server, UA_Subscription *sub) {
/* Cannot publish without a response */
if
(
!
pre
)
{
UA_LOG_
DEBU
G_SESSION
(
server
->
config
.
logger
,
sub
->
session
,
"Subscription %u | Cannot send a publish response "
"since the publish queue is empty"
,
sub
->
subscriptionID
)
UA_LOG_
WARNIN
G_SESSION
(
server
->
config
.
logger
,
sub
->
session
,
"Subscription %u | Cannot send a publish response "
"since the publish queue is empty"
,
sub
->
subscriptionID
)
if
(
sub
->
state
!=
UA_SUBSCRIPTIONSTATE_LATE
)
{
sub
->
state
=
UA_SUBSCRIPTIONSTATE_LATE
;
}
else
{
++
sub
->
currentLifetimeCount
;
if
(
sub
->
currentLifetimeCount
>
sub
->
lifeTimeCount
)
{
UA_LOG_
DEBU
G_SESSION
(
server
->
config
.
logger
,
sub
->
session
,
"Subscription %u | "
"End of lifetime for subscription"
,
sub
->
subscriptionID
);
UA_LOG_
WARNIN
G_SESSION
(
server
->
config
.
logger
,
sub
->
session
,
"Subscription %u | "
"End of lifetime for subscription"
,
sub
->
subscriptionID
);
UA_Session_deleteSubscription
(
server
,
sub
->
session
,
sub
->
subscriptionID
);
}
}
...
...
This diff is collapsed.
Click to expand it.
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
Menu
Projects
Groups
Snippets
Help