Commit 4eb7983
Correct off-by-one error in address table indices
Commit c0fa444 changed the indices of this for loop from being
0-based to 1-based, but did not update the index into the contact
object's "address" member accordingly to be zero-based. This meant that
the value defined in the "address1" attribute of contact objects was
made available in the "address2" attribute in LiveStatus query results,
and "address2" in "address3" etc, per the definitions for the contact
object in in nagios/objects.h and nagios4/objects.h.
This change restores the zero base case for the loop index, but sets
both the 1-based directive name and the 0-based array index correctly,
restoring the expected behaviour.1 parent fec5053 commit 4eb7983
1 file changed
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
71 | 71 | | |
72 | 72 | | |
73 | 73 | | |
74 | | - | |
75 | | - | |
| 74 | + | |
| 75 | + | |
76 | 76 | | |
77 | 77 | | |
78 | 78 | | |
| |||
0 commit comments