From 66010ed17e71714f35bb34a66cc53e1102a28651 Mon Sep 17 00:00:00 2001 From: Lukas Senger Date: Thu, 14 Jan 2021 15:22:19 +0100 Subject: simtech: fix updating bitmask during gps disabling During disabling of gps sources the bitmask that keeps track of them is updated incorrectly. Instead of removing the current source, all other sources are removed from the mask. One problem that arises from this is, that when you enable GPS after it has been disabled completely (e.g. by disabling all GPS sources), the code will not send a "+CGPS=1,1" command because it incorrectly assumes that GPS is still enabled on the device. --- plugins/simtech/mm-shared-simtech.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'plugins/simtech/mm-shared-simtech.c') diff --git a/plugins/simtech/mm-shared-simtech.c b/plugins/simtech/mm-shared-simtech.c index f6921b61..99c2346e 100644 --- a/plugins/simtech/mm-shared-simtech.c +++ b/plugins/simtech/mm-shared-simtech.c @@ -293,7 +293,7 @@ disable_cgps_ready (MMBaseModem *self, if (error) g_task_return_error (task, error); else { - priv->enabled_sources &= source; + priv->enabled_sources &= ~source; g_task_return_boolean (task, TRUE); } g_object_unref (task); -- cgit v1.2.3-70-g09d2