Commit 91bf5e0
committed
[Bugfix] Peripheral connection event delay/missing disconnect event
This removes some incorrect upstream changes that would allow a peripheral/server device to recieve
events from connected client requests without the application being aware of the connection.
The code was changed from the original mynewt event flow in that the connection event
is not sent until a response from a request to read the remote version/features where originally
the event was sent before these responses were received.
This reverts this situaton for the peripheral role because when the connection is made in this case
it is fully established and there is no need to wait for the responses to the above requests.
In addition the delay caused by these was allowing connected peers to interact without the application
knowing of the connection, creating unexpoected issues.
One of those issues is the client could disconnect before the peripheral receives a response to the
above requests and the changes that were made would prevent the disconnect event from being sent because
the connection was not considered established.
Finally, the connection reattempt code was checking for a connection establishment failure when the device was
acting as a slave, which is incorrect as that condition cannot happen if the spec is followed. The controller
should never send this event to a peripheral device waiting for connection, it should just stay advertsing.
This patch removes all of the unecessary code that was added and reverts the flow to the original mynewt flow for
peripheral devices.1 parent ea5f2ec commit 91bf5e0
2 files changed
Lines changed: 16 additions & 41 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
296 | 296 | | |
297 | 297 | | |
298 | 298 | | |
299 | | - | |
300 | 299 | | |
301 | 300 | | |
302 | 301 | | |
| |||
1557 | 1556 | | |
1558 | 1557 | | |
1559 | 1558 | | |
1560 | | - | |
1561 | | - | |
1562 | 1559 | | |
1563 | 1560 | | |
1564 | 1561 | | |
| |||
1595 | 1592 | | |
1596 | 1593 | | |
1597 | 1594 | | |
1598 | | - | |
1599 | | - | |
1600 | | - | |
1601 | | - | |
1602 | | - | |
1603 | | - | |
1604 | | - | |
1605 | | - | |
1606 | | - | |
1607 | | - | |
1608 | | - | |
1609 | | - | |
1610 | | - | |
1611 | 1595 | | |
1612 | 1596 | | |
1613 | 1597 | | |
| |||
1618 | 1602 | | |
1619 | 1603 | | |
1620 | 1604 | | |
1621 | | - | |
1622 | | - | |
1623 | | - | |
1624 | | - | |
| 1605 | + | |
| 1606 | + | |
1625 | 1607 | | |
1626 | 1608 | | |
1627 | 1609 | | |
| |||
2770 | 2752 | | |
2771 | 2753 | | |
2772 | 2754 | | |
| 2755 | + | |
2773 | 2756 | | |
| 2757 | + | |
2774 | 2758 | | |
2775 | | - | |
| 2759 | + | |
2776 | 2760 | | |
2777 | 2761 | | |
2778 | 2762 | | |
| |||
2832 | 2816 | | |
2833 | 2817 | | |
2834 | 2818 | | |
2835 | | - | |
| 2819 | + | |
2836 | 2820 | | |
2837 | | - | |
2838 | | - | |
2839 | | - | |
2840 | | - | |
2841 | | - | |
2842 | | - | |
2843 | | - | |
2844 | | - | |
2845 | | - | |
| 2821 | + | |
| 2822 | + | |
2846 | 2823 | | |
2847 | 2824 | | |
2848 | 2825 | | |
| |||
2864 | 2841 | | |
2865 | 2842 | | |
2866 | 2843 | | |
2867 | | - | |
2868 | | - | |
2869 | | - | |
2870 | | - | |
2871 | | - | |
| 2844 | + | |
| 2845 | + | |
| 2846 | + | |
| 2847 | + | |
| 2848 | + | |
2872 | 2849 | | |
2873 | 2850 | | |
2874 | 2851 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
40 | | - | |
41 | 40 | | |
42 | 41 | | |
43 | 42 | | |
| |||
285 | 284 | | |
286 | 285 | | |
287 | 286 | | |
288 | | - | |
289 | | - | |
290 | | - | |
| 287 | + | |
| 288 | + | |
291 | 289 | | |
292 | 290 | | |
293 | 291 | | |
294 | 292 | | |
295 | 293 | | |
296 | 294 | | |
297 | 295 | | |
298 | | - | |
| 296 | + | |
299 | 297 | | |
300 | 298 | | |
301 | 299 | | |
| |||
0 commit comments