From: Erich Keane Date: Tue, 13 Jan 2015 21:39:57 +0000 (-0800) Subject: Changed OCStackResult to be consistent across compile flags. X-Git-Tag: 1.2.0+RC1~1979^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b7786c89ef40ec15c904633b979be6c73dfee53d;p=platform%2Fupstream%2Fiotivity.git Changed OCStackResult to be consistent across compile flags. Issue 245 was reported that pointed out that the presence flag in the compiler makes OCStackResult incompatible across differently compiled versions of the CStack. Additionally, this spaces out the error codes from success codes, permitting additional room for more success codes. Change-Id: Ia93f34e23756e7663ea80f6667699d59e358058e Signed-off-by: Erich Keane --- diff --git a/resource/csdk/stack/include/ocstack.h b/resource/csdk/stack/include/ocstack.h index 72de3c2..a430f8b 100644 --- a/resource/csdk/stack/include/ocstack.h +++ b/resource/csdk/stack/include/ocstack.h @@ -144,7 +144,7 @@ typedef enum { OC_STACK_CONTINUE, /* Success status code - END HERE */ /* Error status code - START HERE */ - OC_STACK_INVALID_URI, + OC_STACK_INVALID_URI = 20, OC_STACK_INVALID_QUERY, OC_STACK_INVALID_IP, OC_STACK_INVALID_PORT, @@ -161,18 +161,19 @@ typedef enum { OC_STACK_REPEATED_REQUEST, OC_STACK_NO_OBSERVERS, /* resource has no registered observers */ OC_STACK_OBSERVER_NOT_FOUND, - #ifdef WITH_PRESENCE - OC_STACK_PRESENCE_STOPPED, - OC_STACK_PRESENCE_TIMEOUT, - OC_STACK_PRESENCE_DO_NOT_HANDLE, - #endif OC_STACK_VIRTUAL_DO_NOT_HANDLE, OC_STACK_INVALID_OPTION, OC_STACK_MALFORMED_RESPONSE, /* the remote reply contained malformed data */ OC_STACK_PERSISTENT_BUFFER_REQUIRED, OC_STACK_INVALID_REQUEST_HANDLE, OC_STACK_INVALID_DEVICE_INFO, - OC_STACK_ERROR + /* NOTE: Insert all new error codes here!*/ + #ifdef WITH_PRESENCE + OC_STACK_PRESENCE_STOPPED = 128, + OC_STACK_PRESENCE_TIMEOUT, + OC_STACK_PRESENCE_DO_NOT_HANDLE, + #endif + OC_STACK_ERROR = 255 /* Error status code - END HERE */ } OCStackResult;