CONPRO-1542 Adding left out error codes conversion from EntityHandler to OCStackResult 01/221601/1
authorKush <kush.agrawal@samsung.com>
Fri, 20 Dec 2019 10:42:33 +0000 (16:12 +0530)
committerSudipto Bal <sudipto.bal@samsung.com>
Mon, 6 Jan 2020 05:43:28 +0000 (05:43 +0000)
https://github.sec.samsung.net/RS7-IOTIVITY/IoTivity/commit/eb4f1b5d1cd3696e187ee1e6ec0d0a7a75cbe321
(cherry-picked from eb4f1b5d1cd3696e187ee1e6ec0d0a7a75cbe321)

Change-Id: Icb0e572691466ffd2cb94a277648e0c89b7f19a0
Signed-off-by: Kush <kush.agrawal@samsung.com>
Signed-off-by: Sudipto <sudipto.bal@samsung.com>
resource/csdk/stack/src/ocresource.c

index 287244b..064672b 100644 (file)
@@ -703,6 +703,24 @@ OCStackResult EntityHandlerCodeToOCStackCode(OCEntityHandlerResult ehResult)
         case OC_EH_PROXY_NOT_SUPPORTED:
             result = OC_STACK_PROXY_NOT_SUPPORTED;
             break;
+        case OC_EH_BAD_REQ:
+            result = OC_STACK_INVALID_QUERY;
+            break;
+        case OC_EH_UNAUTHORIZED_REQ:
+            result = OC_STACK_UNAUTHORIZED_REQ;
+            break;
+        case OC_EH_BAD_OPT:
+            result = OC_STACK_INVALID_OPTION;
+            break;
+        case OC_EH_TOO_LARGE:
+            result = OC_STACK_TOO_LARGE_REQ;
+            break;
+        case OC_EH_NOT_ACCEPTABLE:
+            result = OC_STACK_NOT_ACCEPTABLE;
+            break;
+        case OC_EH_METHOD_NOT_ALLOWED:
+            result = OC_STACK_METHOD_NOT_ALLOWED;
+            break;
         default:
             result = OC_STACK_ERROR;
     }