[
https://issues.apache.org/jira/browse/MYNEWT-324?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15716016#comment-15716016
]
ASF subversion and git services commented on MYNEWT-324:
--------------------------------------------------------
Commit 9f9377088815bd987564064c433d43552ad3e1ef in incubator-mynewt-core's
branch refs/heads/develop from [~ccollins476]
[ https://git-wip-us.apache.org/repos/asf?p=incubator-mynewt-core.git;h=9f93770
]
MYNEWT-324 BLE Host - Don't use req buf for wr.rsp
Never reuse the request mbuf for a write response. The rationale is
explained in the comment below:
/**
* Notes on buffer reuse:
* Most request handlers reuse the request buffer for the reponse. This
* is done to prevent out-of-memory conditions. However, there are two
* handlers which do not reuse the request buffer:
* 1. Write request.
* 2. Indicate request.
*
* Both of these handlers attempt to allocate a new buffer for the
* response prior to processing the request. If allocation fails, the
* request is not processed, and the request buffer is reused for the
* transmission of an "insufficient resources" ATT error response.
* These handlers don't reuse the request mbuf for an affirmative
* response because the buffer contains the attribute data that gets
* passed to the application callback. The application may choose to
* retain the mbuf during the callback, so the stack
*/
> BLE Host - Ensure there is always sufficient resources to send an ATT
> "insufficient-resources" error response.
> --------------------------------------------------------------------------------------------------------------
>
> Key: MYNEWT-324
> URL: https://issues.apache.org/jira/browse/MYNEWT-324
> Project: Mynewt
> Issue Type: Bug
> Components: Nimble
> Reporter: Christopher Collins
> Assignee: Christopher Collins
> Fix For: v1_0_0_rel
>
>
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)