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
31
Issues
31
List
Boards
Labels
Service Desk
Milestones
Merge Requests
6
Merge Requests
6
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
082f222f
Commit
082f222f
authored
Apr 02, 2020
by
Kishen Maloor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
oc_discovery: Minor fixes
Signed-off-by:
Kishen Maloor
<
kishen.maloor@intel.com
>
parent
0713581d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
25 deletions
+6
-25
api/oc_discovery.c
api/oc_discovery.c
+6
-25
No files found.
api/oc_discovery.c
View file @
082f222f
...
...
@@ -586,33 +586,12 @@ oc_ri_process_discovery_payload(uint8_t *payload, int len,
rep
=
rep
->
next
;
}
oc_rep_t
*
link
=
links
->
value
.
object
;
while
(
link
!=
NULL
)
{
switch
(
link
->
type
)
{
case
OC_REP_STRING
:
{
if
(
oc_string_len
(
link
->
name
)
==
6
&&
memcmp
(
oc_string
(
link
->
name
),
"anchor"
,
6
)
==
0
)
{
anchor
=
&
link
->
value
.
string
;
}
}
break
;
default:
break
;
}
if
(
anchor
)
{
break
;
}
link
=
link
->
next
;
}
oc_uuid_t
di
;
oc_str_to_uuid
(
oc_string
(
*
anchor
)
+
6
,
&
di
);
while
(
links
!=
NULL
)
{
/* Reset bm in every round as this can be omitted if 0. */
oc_uuid_t
di
;
oc_resource_properties_t
bm
=
0
;
oc_endpoint_t
*
eps_list
=
NULL
;
link
=
links
->
value
.
object
;
oc_rep_t
*
link
=
links
->
value
.
object
;
while
(
link
!=
NULL
)
{
switch
(
link
->
type
)
{
...
...
@@ -620,6 +599,7 @@ oc_ri_process_discovery_payload(uint8_t *payload, int len,
if
(
oc_string_len
(
link
->
name
)
==
6
&&
memcmp
(
oc_string
(
link
->
name
),
"anchor"
,
6
)
==
0
)
{
anchor
=
&
link
->
value
.
string
;
oc_str_to_uuid
(
oc_string
(
*
anchor
)
+
6
,
&
di
);
}
else
if
(
oc_string_len
(
link
->
name
)
==
4
&&
memcmp
(
oc_string
(
link
->
name
),
"href"
,
4
)
==
0
)
{
uri
=
&
link
->
value
.
string
;
...
...
@@ -653,8 +633,9 @@ oc_ri_process_discovery_payload(uint8_t *payload, int len,
memcmp
(
oc_string
(
ep
->
name
),
"ep"
,
2
)
==
0
)
{
if
(
oc_string_to_endpoint
(
&
ep
->
value
.
string
,
&
temp_ep
,
NULL
)
==
0
)
{
if
(((
endpoint
->
flags
&
IPV4
)
&&
(
temp_ep
.
flags
&
IPV6
))
||
((
endpoint
->
flags
&
IPV6
)
&&
(
temp_ep
.
flags
&
IPV4
)))
{
if
(
!
(
temp_ep
.
flags
&
TCP
)
&&
(((
endpoint
->
flags
&
IPV4
)
&&
(
temp_ep
.
flags
&
IPV6
))
||
((
endpoint
->
flags
&
IPV6
)
&&
(
temp_ep
.
flags
&
IPV4
))))
{
goto
next_ep
;
}
if
(
eps_cur
)
{
...
...
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