Parent: b086260ac6d4ac765bdc443bb50bd304b0d076c9
Author: Joseph Hwang <josephsih@chromium.org>
Committer: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Date: 2022-02-23 18:57:33
Tree: 78a24b967bcdda8952f8d9fc885e6f9b97cf218a
monitor: fix division by zero about conn->tx_pkt_med In a connection without outgoing traffic, conn->tx_num will remain 0. In this case, conn->tx_pkt_med should be simply 0 without calculating "conn->tx_bytes / conn->tx_num". This was likely to happen, for example, when "btmon -w btsnoop.log" was launched in the middle of a LE mouse connection, and a number of incoming ACL Data RX were received as the mouse movements. When running "btmon -a btsnoop.log", it would encounter this error. Reviewed-by: Alain Michaud <alainm@chromium.org> Reviewed-by: Yun-Hao Chung <howardchung@chromium.org> Reviewed-by: Shuo-Peng Liao <deanliao@chromium.org>
Diffstat
| M | monitor/analyze.c | | | 3 | ++- |
1 files changed, 2 insertions(+), 1 deletions(-)