ubusd: fix tx_queue linked list usage
authorAlexander Van Parys <alexander.vanparys_ext@softathome.com>
Wed, 30 Jun 2021 18:12:46 +0000 (20:12 +0200)
committerPetr Štetiar <ynezz@true.cz>
Thu, 1 Jul 2021 11:52:24 +0000 (13:52 +0200)
commit38c7fdd8991366cd2f9ccbc47625f9b51b1d318a
tree2f2f211074e1adef7e95a42240028f071b47a3a3
parent90fb56c00bbd911d929227528e679b174b1f4cec
ubusd: fix tx_queue linked list usage

Use the correct parameters for list_add_tail when enqueueing a message
in the tx_queue. Previously, list_add_tail(list, entry) was used instead
of list_add_tail(entry, list). Due to this, the list would only contain
the latest entry, and previously inserted entries were left dangling.

Reset the tx_queue offset after a message from the tx_queue has been sent
completely.

Signed-off-by: Alexander Van Parys <alexander.vanparys_ext@softathome.com>
(cherry picked from commit 4fc532c8a55ba8217ad67d7fd47c5eb9a8aba044)
ubusd.c
ubusd_main.c