Message ID | 20211130122106.3624036-1-JPEWhacker@gmail.com |
---|---|
State | Accepted |
Headers | show |
Series | mongoose: Only ignore PROGRESS status | expand |
On 30.11.21 13:21, Joshua Watt wrote: > 2c32873 ("mongoose: Ignore PROGRESS messages") broke reporting of update > progress because the PROGRESS messages can hold valid data besides the > status. Update the code to only suppress sending the UNKNOWN status > message, but still send the other messages. > > Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> > --- > mongoose/mongoose_interface.c | 6 ++---- > 1 file changed, 2 insertions(+), 4 deletions(-) > > diff --git a/mongoose/mongoose_interface.c b/mongoose/mongoose_interface.c > index 31548cc..7235d8d 100644 > --- a/mongoose/mongoose_interface.c > +++ b/mongoose/mongoose_interface.c > @@ -229,10 +229,8 @@ static void *broadcast_progress_thread(void *data) > if (ret != sizeof(msg)) > return NULL; > > - if (msg.status == PROGRESS) > - continue; > - > - if (msg.status != status || msg.status == FAILURE) { > + if (msg.status != PROGRESS && > + (msg.status != status || msg.status == FAILURE)) { > status = msg.status; > > snescape(escaped, sizeof(escaped), get_status_string(msg.status)); > Tested-by: Stefano Babic <sbabic@denx.de> Regards, Stefano
diff --git a/mongoose/mongoose_interface.c b/mongoose/mongoose_interface.c index 31548cc..7235d8d 100644 --- a/mongoose/mongoose_interface.c +++ b/mongoose/mongoose_interface.c @@ -229,10 +229,8 @@ static void *broadcast_progress_thread(void *data) if (ret != sizeof(msg)) return NULL; - if (msg.status == PROGRESS) - continue; - - if (msg.status != status || msg.status == FAILURE) { + if (msg.status != PROGRESS && + (msg.status != status || msg.status == FAILURE)) { status = msg.status; snescape(escaped, sizeof(escaped), get_status_string(msg.status));
2c32873 ("mongoose: Ignore PROGRESS messages") broke reporting of update progress because the PROGRESS messages can hold valid data besides the status. Update the code to only suppress sending the UNKNOWN status message, but still send the other messages. Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> --- mongoose/mongoose_interface.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)