Fixed usages of strtok to use strtok_r instead
authorErich Keane <erich.keane@intel.com>
Thu, 11 Dec 2014 19:37:33 +0000 (11:37 -0800)
committerErich Keane <erich.keane@intel.com>
Thu, 11 Dec 2014 19:37:33 +0000 (11:37 -0800)
commit05d356787bca597bf162104d1f1db0d5c83f8728
treec995a4200d84594d862450ed6eac1f978c272105
parentf18bc832742ae26e90f26374b78132bf9634f125
Fixed usages of strtok to use strtok_r instead

strtok is not thread safe and has a global state variable that
have serious side effects.  If any consumer of ours was to use
threads and strtok they could very easily corrupt the state on us
(or us on them!).  This fix replaces it with the non-side effect
POSIX version, which is strtok_r.  Note that in occollection.c
we are already using strtok_r.

Change-Id: Ie39a2a2ab35a0b1f13a82542ef6963662ac5c53e
Signed-off-by: Erich Keane <erich.keane@intel.com>
resource/csdk/occoap/src/occoap.c
resource/csdk/stack/src/ocresource.c
resource/csdk/stack/src/ocstack.c