Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
OpnSense
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kulya
OpnSense
Commits
d941a2eb
Commit
d941a2eb
authored
May 11, 2015
by
Franco Fichtner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
inc: more gettext() weirdness
parent
321d458e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
9 deletions
+10
-9
gwlb.inc
src/etc/inc/gwlb.inc
+10
-9
No files found.
src/etc/inc/gwlb.inc
View file @
d941a2eb
...
...
@@ -823,16 +823,16 @@ function return_gateway_groups_array() {
if
(
is_array
(
$gateways_status
[
$gwname
]))
{
$status
=
$gateways_status
[
$gwname
];
$gwdown
=
false
;
if
(
stristr
(
$status
[
'status'
],
"down"
))
{
$msg
=
sprintf
(
gettext
(
"MONITOR: %s is down, removing from routing group
{
$group
[
'name'
]
}
"
),
$gwname
);
if
(
stristr
(
$status
[
'status'
],
'down'
))
{
$msg
=
sprintf
(
_
(
'MONITOR: %s is down, removing from routing group %s'
),
$gwname
,
$group
[
'name'
]
);
$gwdown
=
true
;
}
else
if
(
stristr
(
$status
[
'status'
],
"loss"
)
&&
strstr
(
$group
[
'trigger'
],
"loss"
))
{
}
else
if
(
stristr
(
$status
[
'status'
],
'loss'
)
&&
strstr
(
$group
[
'trigger'
],
'loss'
))
{
/* packet loss */
$msg
=
sprintf
(
gettext
(
"MONITOR: %s has packet loss, removing from routing group
{
$group
[
'name'
]
}
"
),
$gwname
);
$msg
=
sprintf
(
_
(
'MONITOR: %s has packet loss, removing from routing group %s'
),
$gwname
,
$group
[
'name'
]
);
$gwdown
=
true
;
}
else
if
(
stristr
(
$status
[
'status'
],
"delay"
)
&&
strstr
(
$group
[
'trigger'
]
,
"latency"
))
{
}
else
if
(
stristr
(
$status
[
'status'
],
'delay'
)
&&
strstr
(
$group
[
'trigger'
]
,
'latency'
))
{
/* high latency */
$msg
=
sprintf
(
gettext
(
"MONITOR: %s has high latency, removing from routing group
{
$group
[
'name'
]
}
"
),
$gwname
);
$msg
=
sprintf
(
_
(
'MONITOR: %s has high latency, removing from routing group %s'
),
$gwname
,
$group
[
'name'
]
);
$gwdown
=
true
;
}
if
(
$gwdown
==
true
)
{
...
...
@@ -845,14 +845,15 @@ function return_gateway_groups_array() {
$tiers
[
$tier
]
=
array
();
$tiers
[
$tier
][]
=
$gwname
;
}
}
else
if
(
isset
(
$gateways_arr
[
$gwname
][
'monitor_disable'
]))
}
else
if
(
isset
(
$gateways_arr
[
$gwname
][
'monitor_disable'
]))
{
$tiers
[
$tier
][]
=
$gwname
;
}
}
$tiers_count
=
count
(
$tiers
);
if
(
$tiers_count
==
0
)
{
/* Oh dear, we have no members! Engage Plan B */
if
(
!
file_exists
(
"/var/run/booting"
))
{
$msg
=
gettext
(
"Gateways status could not be determined, considering all as up/active. (Group:
{
$group
[
'name'
]
}
)"
);
if
(
!
file_exists
(
'/var/run/booting'
))
{
$msg
=
sprintf
(
_
(
'Gateways status could not be determined, considering all as up/active. (Group: %s)'
),
$group
[
'name'
]
);
log_error
(
$msg
);
notify_via_growl
(
$msg
);
//notify_via_smtp($msg);
...
...
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