Moved a requestId declaration in OCServerRequest 59/118859/1
authorhyuna0213.jo <hyuna0213.jo@samsung.com>
Thu, 2 Feb 2017 07:48:37 +0000 (16:48 +0900)
committerJooseok Park <jooseok.park@samsung.com>
Tue, 14 Mar 2017 09:32:42 +0000 (18:32 +0900)
we should not add attributes after payload as they get overwritten
when payload content gets copied over.

Change-Id: I0c8a430f92c2196d3f9c816e9ba9d16fd44d88e4
Signed-off-by: hyuna0213.jo <hyuna0213.jo@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/17015
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
resource/csdk/stack/include/internal/ocserverrequest.h

index 7a1068b..1de99ea 100644 (file)
@@ -72,6 +72,9 @@ typedef struct OCServerRequest
     /** Remote endpoint address **/
     OCDevAddr devAddr;
 
+    /** The ID of server request*/
+    uint32_t requestId;
+
     /** Token for the request.*/
     CAToken_t requestToken;
 
@@ -108,9 +111,6 @@ typedef struct OCServerRequest
     /** payload is retrieved from the payload of the received request PDU.*/
     uint8_t payload[1];
 
-    /** The ID of server request*/
-    uint32_t requestId;
-
     // WARNING: Do NOT add attributes after payload as they get overwritten
     // when payload content gets copied over!