The wake lock is acquired before send/recv but is never released (or only
on error path). Always release it instead.

Signed-off-by: Paul Kocialkowski <[email protected]>
---
 srs.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/srs.c b/srs.c
index cae57ccb83bd..f310cf8036f6 100644
--- a/srs.c
+++ b/srs.c
@@ -166,6 +166,8 @@ int srs_send(unsigned short command, const void *data, 
size_t size)
                return -1;
        }
 
+       release_wake_lock(RIL_VERSION_STRING);
+
        return 0;
 }
 
@@ -1121,6 +1123,7 @@ int srs_loop(struct ril_client *ril_client)
                                continue;
                        }
 
+                       release_wake_lock(RIL_VERSION_STRING);
                        RIL_UNLOCK();
 
                        rc = srs_dispatch(ril_client, &message);
-- 
2.46.2

_______________________________________________
Replicant mailing list
[email protected]
https://lists.osuosl.org/mailman/listinfo/replicant

Reply via email to