diff options
author | Denis Kenzior <denkenz@gmail.com> | 2009-05-28 17:58:10 -0500 |
---|---|---|
committer | Denis Kenzior <denkenz@gmail.com> | 2009-05-28 18:29:03 -0500 |
commit | b4d2d29d07bf5194d2feaad0c3aa8d7218d24c94 (patch) | |
tree | 4b51fe0d3c02f66a0058be84a8370beefdfe2a50 /src/network.c | |
parent | d9d10f229274c7b1391bfe73d8c9d673f6446dec (diff) | |
download | ofono-b4d2d29d07bf5194d2feaad0c3aa8d7218d24c94.tar.bz2 |
Fix signal emission when the operator changes
If the operator changes without going through a searching state the
Operator change signal was not properly emitted
Diffstat (limited to 'src/network.c')
-rw-r--r-- | src/network.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/network.c b/src/network.c index 464f30c6..1b6bd185 100644 --- a/src/network.c +++ b/src/network.c @@ -953,14 +953,17 @@ static void current_operator_callback(const struct ofono_error *error, network_operator_compare); if (op) { - netreg->current_operator = op->data; set_network_operator_status(modem, op->data, OPERATOR_STATUS_CURRENT); set_network_operator_technology(modem, op->data, current->tech); set_network_operator_name(modem, op->data, current->name); - return; + if (netreg->current_operator == op->data) + return; + + netreg->current_operator = op->data; + goto emit; } if (current) { @@ -986,6 +989,7 @@ static void current_operator_callback(const struct ofono_error *error, netreg->current_operator = NULL; } +emit: operator = get_operator_display_name(modem); dbus_gsm_signal_property_changed(conn, modem->path, NETWORK_REGISTRATION_INTERFACE, |