[MM] [PATCH] broadband-modem: fix disabling of unsolicited registration events



---
 src/mm-broadband-modem.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/mm-broadband-modem.c b/src/mm-broadband-modem.c
index 9f45904..9d127c9 100644
--- a/src/mm-broadband-modem.c
+++ b/src/mm-broadband-modem.c
@@ -3924,7 +3924,7 @@ unsolicited_registration_events_context_step (UnsolicitedRegistrationEventsConte
         mm_base_modem_at_sequence_full (
             MM_BASE_MODEM (ctx->self),
             mm_base_modem_peek_port_primary (MM_BASE_MODEM (ctx->self)),
-            cs_registration_sequence,
+            ctx->enable ? cs_registration_sequence : cs_unregistration_sequence,
             NULL,  /* response processor context */
             NULL,  /* response processor context free */
             NULL,  /* cancellable */
@@ -3939,7 +3939,7 @@ unsolicited_registration_events_context_step (UnsolicitedRegistrationEventsConte
         mm_base_modem_at_sequence_full (
             MM_BASE_MODEM (ctx->self),
             mm_base_modem_peek_port_primary (MM_BASE_MODEM (ctx->self)),
-            ps_registration_sequence,
+            ctx->enable ? ps_registration_sequence : ps_unregistration_sequence,
             NULL,  /* response processor context */
             NULL,  /* response processor context free */
             NULL,  /* cancellable */
@@ -3954,7 +3954,7 @@ unsolicited_registration_events_context_step (UnsolicitedRegistrationEventsConte
         mm_base_modem_at_sequence_full (
             MM_BASE_MODEM (ctx->self),
             mm_base_modem_peek_port_primary (MM_BASE_MODEM (ctx->self)),
-            eps_registration_sequence,
+            ctx->enable ? eps_registration_sequence : eps_unregistration_sequence,
             NULL,  /* response processor context */
             NULL,  /* response processor context free */
             NULL,  /* cancellable */
-- 
1.8.1.3



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]