Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
W
White Rabbit Switch - Software
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
86
Issues
86
List
Board
Labels
Milestones
Merge Requests
4
Merge Requests
4
CI / CD
CI / CD
Pipelines
Schedules
Wiki
Wiki
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Projects
White Rabbit Switch - Software
Commits
422e6588
Commit
422e6588
authored
Jul 26, 2019
by
Maciej Lipinski
Committed by
Grzegorz Daniluk
Jan 08, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
WIP
parent
57d02a71
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
8 deletions
+16
-8
wrsPortStatusTable.c
userspace/snmpd/wrsPortStatusTable.c
+16
-8
No files found.
userspace/snmpd/wrsPortStatusTable.c
View file @
422e6588
...
...
@@ -190,6 +190,21 @@ time_t wrsPortStatusTable_data_fill(unsigned int *n_rows)
* port down, is set above
* (WRS_PORT_STATUS_SFP_ERROR_PORT_DOWN) */
wrsPortStatusTable_array
[
i
].
wrsPortStatusSfpError
=
WRS_PORT_STATUS_SFP_ERROR_SFP_OK
;
snmp_log
(
LOG_DEBUG
,
"SNMP: "
SL_DEBUG
" reading ports name %s link %d, "
"locked %d
\n
"
,
wrsPortStatusTable_array
[
i
].
wrsPortStatusPortName
,
wrsPortStatusTable_array
[
i
].
wrsPortStatusLink
,
wrsPortStatusTable_array
[
i
].
wrsPortStatusLocked
);
if
(
wrsPortStatusTable_array
[
i
].
wrsPortStatusMonitor
==
WRS_PORT_STATUS_MONITOR_DISABLE
)
{
snmp_log
(
LOG_DEBUG
,
"SNMP: "
SL_DEBUG
" ignoring any "
"problems on port %s as monitoring is disabled
\n
"
,
wrsPortStatusTable_array
[
i
].
wrsPortStatusPortName
;
continue
;
}
if
(
wrsPortStatusTable_array
[
i
].
wrsPortStatusSfpGbE
==
WRS_PORT_STATUS_SFP_GBE_LINK_NOT_GBE
)
{
/* error, SFP is not 1 GbE */
wrsPortStatusTable_array
[
i
].
wrsPortStatusSfpError
=
WRS_PORT_STATUS_SFP_ERROR_SFP_ERROR
;
...
...
@@ -197,8 +212,7 @@ time_t wrsPortStatusTable_data_fill(unsigned int *n_rows)
"SFP in port %d (wri%d) is not for Gigabit Ethernet
\n
"
,
slog_obj_name
,
i
+
1
,
i
+
1
);
}
if
((
wrsPortStatusTable_array
[
i
].
wrsPortStatusMonitor
!=
WRS_PORT_STATUS_MONITOR_DISABLE
)
&&
(
wrsPortStatusTable_array
[
i
].
wrsPortStatusSfpInDB
==
WRS_PORT_STATUS_SFP_IN_DB_NOT_IN_DATA_BASE
))
{
if
(
wrsPortStatusTable_array
[
i
].
wrsPortStatusSfpInDB
==
WRS_PORT_STATUS_SFP_IN_DB_NOT_IN_DATA_BASE
)
{
/* error, port is not non-wr mode and sfp not in data base */
wrsPortStatusTable_array
[
i
].
wrsPortStatusSfpError
=
WRS_PORT_STATUS_SFP_ERROR_SFP_ERROR
;
snmp_log
(
LOG_ERR
,
"SNMP: "
SL_ER
" %s: "
...
...
@@ -207,12 +221,6 @@ time_t wrsPortStatusTable_data_fill(unsigned int *n_rows)
slog_obj_name
,
i
+
1
,
i
+
1
);
}
snmp_log
(
LOG_DEBUG
,
"SNMP: "
SL_DEBUG
" reading ports name %s link %d, "
"locked %d
\n
"
,
wrsPortStatusTable_array
[
i
].
wrsPortStatusPortName
,
wrsPortStatusTable_array
[
i
].
wrsPortStatusLink
,
wrsPortStatusTable_array
[
i
].
wrsPortStatusLocked
);
}
retries
=
0
;
...
...
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