[IOT-3216] Fix /SP resource section write to PS 79/27379/2
authorAleksey Volkov <a.volkov@samsung.com>
Fri, 2 Nov 2018 14:32:44 +0000 (16:32 +0200)
committerNathan Heldt-Sheller <nathan.heldt-sheller@intel.com>
Mon, 5 Nov 2018 19:15:34 +0000 (19:15 +0000)
Fixed `copy-paste` typo due to which SP resource write was skipped ..

Change-Id: I1756a41f93a82b57a02d1c0641995fcf36fe5fa3
Signed-off-by: Aleksey Volkov <a.volkov@samsung.com>
resource/csdk/security/src/psinterface.c

index 3581676..1cb7e14 100644 (file)
@@ -441,7 +441,7 @@ OCStackResult UpdateResourceInPS(const char *databaseName, const char *resourceN
                     cborEncoderResult |= cbor_encode_byte_string(&resource, crlCbor, crlCborLen);
                     VERIFY_CBOR_SUCCESS_OR_OUT_OF_MEMORY(TAG, cborEncoderResult, "Failed Adding Crl Value.");
                 }
-                if (strcmp(OIC_JSON_SP_NAME, resourceName) && crlCborLen)
+                if (strcmp(OIC_JSON_SP_NAME, resourceName) && spCborLen)
                 {
                     cborEncoderResult |= cbor_encode_text_string(&resource, OIC_JSON_SP_NAME, strlen(OIC_JSON_SP_NAME));
                     VERIFY_CBOR_SUCCESS_OR_OUT_OF_MEMORY(TAG, cborEncoderResult, "Failed Adding SP Name.");