Added timeouts and cleanup for zombie callbacks in NON cases.
The client maintains a callback list to pass results upto the app.
If a request, specially a NON request is lost in the network, the
callback will sit in memory forever with no one left to use it.
Added a timeout field for the callback and a default timeout value of 2
hours in ocstackconfig.h. Stack will simultaneously purge timed out callbacks
when going through the callback linked list.
Change-Id: Idbaa7c5c85a40267f101f7bba53c3f98ed29d467
Signed-off-by: Mandeep Shetty <mandeep.shetty@intel.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/843
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Doug Hudson <douglas.hudson@intel.com>
Reviewed-by: Erich Keane <erich.keane@intel.com>