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
10
Merge Requests
10
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
3ad8d605
Commit
3ad8d605
authored
Jan 28, 2020
by
Kishen Maloor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
coap/bwt:not clear res buf upon separate response
Signed-off-by:
Kishen Maloor
<
kishen.maloor@intel.com
>
parent
86d25d49
Pipeline
#219
passed with stage
in 53 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
7 deletions
+12
-7
api/oc_ri.c
api/oc_ri.c
+1
-3
include/oc_client_state.h
include/oc_client_state.h
+1
-1
messaging/coap/engine.c
messaging/coap/engine.c
+10
-3
No files found.
api/oc_ri.c
View file @
3ad8d605
...
...
@@ -1229,7 +1229,7 @@ oc_ri_find_client_cb_by_token(uint8_t *token, uint8_t token_len)
return
cb
;
}
static
bool
bool
oc_ri_is_client_cb_valid
(
oc_client_cb_t
*
client_cb
)
{
oc_client_cb_t
*
cb
=
oc_list_head
(
client_cbs
);
...
...
@@ -1316,7 +1316,6 @@ oc_ri_invoke_client_cb(void *response, oc_client_cb_t *cb,
struct
oc_memb
rep_objects
=
{
sizeof
(
oc_rep_t
),
0
,
0
,
0
,
0
};
#endif
/* OC_DYNAMIC_ALLOCATION */
oc_rep_set_pool
(
&
rep_objects
);
if
(
payload_len
)
{
if
(
cb
->
discovery
)
{
if
(
oc_ri_process_discovery_payload
(
payload
,
payload_len
,
cb
->
handler
,
...
...
@@ -1401,7 +1400,6 @@ oc_ri_invoke_client_cb(void *response, oc_client_cb_t *cb,
}
}
}
return
true
;
}
...
...
include/oc_client_state.h
View file @
3ad8d605
...
...
@@ -103,7 +103,7 @@ oc_client_cb_t *oc_ri_alloc_client_cb(const char *uri, oc_endpoint_t *endpoint,
oc_client_cb_t
*
oc_ri_get_client_cb
(
const
char
*
uri
,
oc_endpoint_t
*
endpoint
,
oc_method_t
method
);
bool
oc_ri_is_client_cb_valid
(
oc_client_cb_t
*
client_cb
);
oc_client_cb_t
*
oc_ri_find_client_cb_by_token
(
uint8_t
*
token
,
uint8_t
token_len
);
...
...
messaging/coap/engine.c
View file @
3ad8d605
...
...
@@ -702,11 +702,18 @@ coap_receive(oc_message_t *msg)
if
(
request_buffer
)
{
request_buffer
->
ref_count
=
0
;
}
if
(
response_buffer
)
{
response_buffer
->
ref_count
=
0
;
}
oc_ri_invoke_client_cb
(
message
,
&
response_buffer
,
client_cb
,
&
msg
->
endpoint
);
/* Do not free the response buffer in case of a separate response
* signal from the server. In this case, the client_cb continues
* to live until the response arrives (or it times out).
*/
if
(
!
oc_ri_is_client_cb_valid
(
client_cb
))
{
if
(
response_buffer
)
{
response_buffer
->
ref_count
=
0
;
}
}
goto
send_message
;
#else
/* OC_BLOCK_WISE */
oc_ri_invoke_client_cb
(
message
,
client_cb
,
&
msg
->
endpoint
);
...
...
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