Skip to contentSkip to conversation

gprs: Always store RoamingAllowed as a boolean.

PATCH Applied [email protected] 2 participants 2 messages Apr 16, 2019

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 gprs: Always store RoamingAllowed as a boolean.

From: Richard Röjfors <[email protected]>

In one instance it was stored as boolean and another as int. Since its always parsed as a boolean and it is a boolean, always store it as boolean.

---
 src/gprs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
src/gprs.c +1 -1
index d432c9fd..148cbc97 100644
@@ -1793,7 +1793,7 @@ static DBusMessage *gprs_set_property(DBusConnection *conn,
 		gprs->roaming_allowed = value;
 
 		if (gprs->settings) {
-			g_key_file_set_integer(gprs->settings, SETTINGS_GROUP,
+			g_key_file_set_boolean(gprs->settings, SETTINGS_GROUP,
 						"RoamingAllowed",
 						gprs->roaming_allowed);
 			storage_sync(gprs->imsi, SETTINGS_STORE,
Signature · 1 line
2.19.1
#1 lore raw

Hi Richard,

Quoted 9 lines · richard.rojfors(a)gmail.com

From: Richard Röjfors <[email protected]>

In one instance it was stored as boolean and another as int. Since its always parsed as a boolean and it is a boolean, always store it as boolean.

---
  src/gprs.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

Applied, thanks.

Regards,
-Denis