I keep getting compile error when trying to use cache for my snmp
application with free function.
But i don't get the same error for the load function, which is weired,
anyone ran into the same problem?
animalTable.c:64: error: conflicting types for âanimalTable_freeâ
animalTable.h:14: note: previous declaration of âanimalTable_freeâ was here
I have the following in my .h file.
===========================
NetsnmpCacheLoad animalTable_load;
NetsnmpCacheFree animalTable_free;
======================
And the following in my .c file
====================
int animalTable_free( netsnmp_cache *cache, void *vmagic )
{
netsnmp_tdata *table = (netsnmp_tdata *)vmagic;
netsnmp_tdata_row *this;
while ((this = netsnmp_tdata_get_first_row(table)))
{
netsnmp_tdata_remove_and_delete_row(table, this);
}
}
==========================
and the following to initialize cache.
=======================
cache = netsnmp_cache_create(ANIMALTABLE_TIMEOUT,
animalTable_load, animalTable_free,
animalTable_oid, animalTable_oid_len);
=====================
------------------------------------------------------------------------------
This SF.net Dev2Dev email is sponsored by:
Show off your parallel programming skills.
Enter the Intel(R) Threading Challenge 2010.
http://p.sf.net/sfu/intel-thread-sfd
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders