summaryrefslogtreecommitdiffstats
path: root/src/sim.c
diff options
context:
space:
mode:
authorDenis Kenzior <denis.kenzior@intel.com>2009-08-31 14:13:12 -0500
committerDenis Kenzior <denkenz@gmail.com>2009-08-31 15:12:37 -0500
commit37deaa66518701ed2112dda723d20630abe1b966 (patch)
tree37d7730bde28e25faf1a22f8f8fae823c7a8be87 /src/sim.c
parent526e1a6164a6e77e33032f1ffa357d0ed3ee40a2 (diff)
downloadofono-37deaa66518701ed2112dda723d20630abe1b966.tar.bz2
Refactor sim mnc length
Diffstat (limited to 'src/sim.c')
-rw-r--r--src/sim.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/sim.c b/src/sim.c
index e06511a1..e77347c8 100644
--- a/src/sim.c
+++ b/src/sim.c
@@ -478,14 +478,15 @@ static void sim_ad_read_cb(int ok,
new_mnc_length = data[3] & 0xf;
- if (sim->mnc_length != new_mnc_length) {
- sim->mnc_length = new_mnc_length;
+ if (sim->mnc_length == new_mnc_length)
+ return;
- ofono_dbus_signal_property_changed(conn, path,
- SIM_MANAGER_INTERFACE,
- "MNCLength", DBUS_TYPE_BYTE,
- &sim->mnc_length);
- }
+ sim->mnc_length = new_mnc_length;
+
+ ofono_dbus_signal_property_changed(conn, path,
+ SIM_MANAGER_INTERFACE,
+ "MNCLength", DBUS_TYPE_BYTE,
+ &sim->mnc_length);
}
static gint service_number_compare(gconstpointer a, gconstpointer b)