Added timeouts and cleanup for zombie callbacks in NON cases.
authorMandeep Shetty <mandeep.shetty@intel.com>
Mon, 27 Apr 2015 23:26:52 +0000 (16:26 -0700)
committerErich Keane <erich.keane@intel.com>
Tue, 28 Apr 2015 22:06:25 +0000 (22:06 +0000)
commit919c1c6a8a2052d2538a355642a6d5c653aadb7b
tree16e263d9c0d8d066bd70e3587762aeb31154552e
parent6437455da526cb71986515387de5211f1180e03b
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>
resource/csdk/stack/include/internal/occlientcb.h
resource/csdk/stack/include/ocstackconfig.h
resource/csdk/stack/src/occlientcb.c
resource/csdk/stack/src/ocstack.c