From b4d2d29d07bf5194d2feaad0c3aa8d7218d24c94 Mon Sep 17 00:00:00 2001 From: Denis Kenzior Date: Thu, 28 May 2009 17:58:10 -0500 Subject: [PATCH] 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 --- src/network.c | 8 ++++++-- 1 file 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,