[Replicant] [PATCH 1/1] srs: Release wake lock in send and loop

Paul Kocialkowski contact at paulk.fr
Thu Oct 3 17:49:35 UTC 2024


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 <contact at paulk.fr>
---
 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



More information about the Replicant mailing list