Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 94eddcf3 authored by sadiqsada's avatar sadiqsada Committed by Sadiq Sada
Browse files

Handle IPTV tuning read error

bytes_read will be -1 if recv_from() fails to capture data from
the udp socket.

Bug: 288170590
Test: atest VtsHalTvTunerTargetTest
Change-Id: I7f3c4789d2631c5add8dff778e2155b7e95a3ffc
parent 028f2761
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -215,7 +215,7 @@ Frontend::~Frontend() {

void Frontend::readTuneByte(dtv_streamer* streamer, void* buf, size_t buf_size, int timeout_ms) {
    ssize_t bytes_read = mIptvPluginInterface->read_stream(streamer, buf, buf_size, timeout_ms);
    if (bytes_read == 0) {
    if (bytes_read <= 0) {
        ALOGI("[   ERROR   ] Tune byte couldn't be read.");
        return;
    }