Don't use net-snmp's memdup function, as it is replaced by

netsnmp_memdup with a different interface in version 5.7.3.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/ec/trunk@40310 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
wlux 2017-01-30 12:54:37 +00:00
parent 469aa3203c
commit 0cc49a94d5
2 changed files with 8 additions and 2 deletions

View file

@ -1,3 +1,9 @@
2017-01-30 Wolfgang Lux <wolfgang.lux@gmail.com>
* EcAlarmSinkSNMP.m (pollHeartBeat_handler): Don't use memdup,
which is replaced by netsnmp_memdup with a different interface in
net-snmp 5.7.3.
2016-07-20 Wolfgang Lux <wolfgang.lux@gmail.com>
* EcConsole.m (-ecRun): Pass distantFuture to -runMode:beforeDate:

View file

@ -773,8 +773,8 @@ pollHeartBeat_handler(netsnmp_mib_handler *handler,
/*
* store old info for undo later
*/
memdup((u_char**)&pollHeartBeat_cache,
(u_char*)&pollHeartBeat, sizeof(pollHeartBeat));
pollHeartBeat_cache = malloc(sizeof(pollHeartBeat));
memcpy(&pollHeartBeat_cache, &pollHeartBeat, sizeof(pollHeartBeat));
if (pollHeartBeat_cache == NULL)
{
netsnmp_set_request_error(reqinfo, requests,