fix setting notification id

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/ec/trunk@38655 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Richard Frith-MacDonald 2015-06-17 19:30:26 +00:00
parent 551a021c3e
commit cabaca2c9f
2 changed files with 10 additions and 5 deletions

View file

@ -1,3 +1,7 @@
2015-06-17 Richard Frith-Macdonald <rfm@gnu.org>
* EcAlarmSinkSNMP.m: Fix stupid mistake setting notificationID.
2015-06-16 Richard Frith-Macdonald <rfm@gnu.org>
* EcAlarmSinkSNMP.m: Fix error in alarms table oid length.

View file

@ -1580,8 +1580,8 @@ objectsTable_handler(netsnmp_mib_handler *handler,
struct alarmsTable_entry *entry;
entry = (struct alarmsTable_entry *)
netsnmp_tdata_remove_and_delete_row(alarmsTable,
row);
netsnmp_tdata_remove_and_delete_row(
alarmsTable, row);
if (0 != entry)
{
SNMP_FREE(entry);
@ -1617,12 +1617,12 @@ objectsTable_handler(netsnmp_mib_handler *handler,
if (nil == prev)
{
row = alarmsTable_createEntry
([next notificationID]);
/* Add and send the new alarm
*/
if (++notificationID <= 0) notificationID = 1;
[next setNotificationID: notificationID];
row = alarmsTable_createEntry(
[next notificationID]);
}
else
{
@ -1631,7 +1631,8 @@ objectsTable_handler(netsnmp_mib_handler *handler,
row = (netsnmp_tdata_row*)[prev extra];
/* send the clear for the entry.
*/
[next setNotificationID: [prev notificationID]];
[next setNotificationID:
[prev notificationID]];
[alarmSink _trap: prev forceClear: YES];
}