Skip to contentSkip to conversation

hfpmodem: fix network status

PATCH In review Frédéric Danis 2 participants 2 messages Jul 26, 2011

lore
Share & tools
lore
#1 lore raw
In reply to Frédéric Danis

Hi Frédéric,

Quoted 7 lines · Frédéric Danis

When receiving roaming indicator update to 0 (no roaming) network registration status should be updated with latest value of service indicator.

---
 drivers/hfpmodem/network-registration.c |   10 +++++++---
 1 files changed, 7 insertions(+), 3 deletions(-)

Patch has been applied, thanks.

Regards,
-Denis

#0 lore raw

PATCH 1/1 hfpmodem: fix network status

When receiving roaming indicator update to 0 (no roaming) network registration status should be updated with latest value of service indicator.

---
 drivers/hfpmodem/network-registration.c |   10 +++++++---
 1 files changed, 7 insertions(+), 3 deletions(-)
drivers/hfpmodem/network-registration.c +7 -3
index 4cb2b14..7d26424 100644
@@ -130,10 +130,14 @@ static void ciev_notify(GAtResult *result, gpointer user_data)
 	} else if (index == nd->cind_pos[HFP_INDICATOR_ROAM]) {
 		nd->cind_val[HFP_INDICATOR_ROAM] = value;
 
-		if (value) {
+		if (value)
 			status = NETWORK_REGISTRATION_STATUS_ROAMING;
-			ofono_netreg_status_notify(netreg, status, -1, -1, -1);
-		}
+		else if (nd->cind_val[HFP_INDICATOR_SERVICE])
+			status = NETWORK_REGISTRATION_STATUS_REGISTERED;
+		else
+			status = NETWORK_REGISTRATION_STATUS_NOT_REGISTERED;
+
+		ofono_netreg_status_notify(netreg, status, -1, -1, -1);
 	} else if (index == nd->cind_pos[HFP_INDICATOR_SIGNAL]) {
 		nd->cind_val[HFP_INDICATOR_SIGNAL] = value;
 		ofono_netreg_strength_notify(netreg, value * 20);
Signature · 1 line
1.7.1