Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
I
iotivity-lite
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
41
Issues
41
List
Boards
Labels
Service Desk
Milestones
Merge Requests
11
Merge Requests
11
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
IoTivity
iotivity-lite
Commits
60138901
Commit
60138901
authored
Apr 27, 2020
by
Kishen Maloor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
oc_cloud:fix cloud_deregistered_internal()
Signed-off-by:
Kishen Maloor
<
kishen.maloor@intel.com
>
parent
45b46ab3
Pipeline
#743
passed with stage
in 6 minutes and 33 seconds
Changes
2
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
7 deletions
+10
-7
api/cloud/oc_cloud_apis.c
api/cloud/oc_cloud_apis.c
+2
-1
security/oc_cred.c
security/oc_cred.c
+8
-6
No files found.
api/cloud/oc_cloud_apis.c
View file @
60138901
...
@@ -231,7 +231,8 @@ cloud_deregistered_internal(oc_client_response_t *data)
...
@@ -231,7 +231,8 @@ cloud_deregistered_internal(oc_client_response_t *data)
{
{
cloud_api_param_t
*
p
=
(
cloud_api_param_t
*
)
data
->
user_data
;
cloud_api_param_t
*
p
=
(
cloud_api_param_t
*
)
data
->
user_data
;
oc_cloud_context_t
*
ctx
=
p
->
ctx
;
oc_cloud_context_t
*
ctx
=
p
->
ctx
;
if
(
data
->
code
>=
OC_STATUS_SERVICE_UNAVAILABLE
)
{
if
(
data
->
code
<
OC_STATUS_BAD_REQUEST
||
data
->
code
>=
OC_STATUS_SERVICE_UNAVAILABLE
)
{
ctx
->
store
.
status
=
OC_CLOUD_DEREGISTERED
;
ctx
->
store
.
status
=
OC_CLOUD_DEREGISTERED
;
}
else
if
(
data
->
code
>=
OC_STATUS_BAD_REQUEST
)
{
}
else
if
(
data
->
code
>=
OC_STATUS_BAD_REQUEST
)
{
cloud_set_last_error
(
ctx
,
CLOUD_ERROR_RESPONSE
);
cloud_set_last_error
(
ctx
,
CLOUD_ERROR_RESPONSE
);
...
...
security/oc_cred.c
View file @
60138901
...
@@ -1086,12 +1086,14 @@ oc_sec_decode_cred(oc_rep_t *rep, oc_sec_cred_t **owner, bool from_storage,
...
@@ -1086,12 +1086,14 @@ oc_sec_decode_cred(oc_rep_t *rep, oc_sec_cred_t **owner, bool from_storage,
oc_sec_cred_t
*
cr
=
oc_sec_get_cred_by_credid
(
credid
,
device
);
oc_sec_cred_t
*
cr
=
oc_sec_get_cred_by_credid
(
credid
,
device
);
if
(
cr
)
{
if
(
cr
)
{
cr
->
owner_cred
=
owner_cred
;
cr
->
owner_cred
=
owner_cred
;
}
/* Obtain a handle to the owner credential entry where that
/* Obtain a handle to the owner credential entry where that applies
* applies
*/
*/
if
(
credtype
==
OC_CREDTYPE_PSK
&&
privatedata_size
==
0
&&
owner
)
{
if
(
credtype
==
OC_CREDTYPE_PSK
&&
privatedata_size
==
0
&&
*
owner
=
cr
;
owner
)
{
(
*
owner
)
->
owner_cred
=
true
;
*
owner
=
cr
;
(
*
owner
)
->
owner_cred
=
true
;
}
}
}
}
}
creds_array
=
creds_array
->
next
;
creds_array
=
creds_array
->
next
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment