From 57512ad924b4c74f420a536efc009baa89a70a59 Mon Sep 17 00:00:00 2001 From: Denis Kenzior Date: Thu, 17 Dec 2009 21:33:48 -0600 Subject: [PATCH] Style: Repeat for plugins --- plugins/atgen.c | 3 ++- plugins/calypso.c | 3 ++- plugins/modemconf.c | 6 ++++-- plugins/phonesim.c | 3 ++- plugins/udev.c | 6 ++++-- 5 files changed, 14 insertions(+), 7 deletions(-) diff --git a/plugins/atgen.c b/plugins/atgen.c index 8300da2..e174d6f 100644 --- a/plugins/atgen.c +++ b/plugins/atgen.c @@ -121,8 +121,9 @@ static int atgen_enable(struct ofono_modem *modem) syntax = g_at_syntax_new_gsm_permissive(); else return -EINVAL; - } else + } else { syntax = g_at_syntax_new_gsmv1(); + } chat = g_at_chat_new(channel, syntax); g_at_syntax_unref(syntax); diff --git a/plugins/calypso.c b/plugins/calypso.c index c5403de..4d01881 100644 --- a/plugins/calypso.c +++ b/plugins/calypso.c @@ -211,8 +211,9 @@ static void cfun_set_on_cb(gboolean ok, GAtResult *result, gpointer user_data) g_at_mux_shutdown(data->mux); g_at_mux_unref(data->mux); data->mux = NULL; - } else + } else { setup_modem(modem); + } ofono_modem_set_powered(modem, ok); } diff --git a/plugins/modemconf.c b/plugins/modemconf.c index 39a62b8..882fa5a 100644 --- a/plugins/modemconf.c +++ b/plugins/modemconf.c @@ -57,15 +57,17 @@ static int set_address(struct ofono_modem *modem, if (value) { ofono_modem_set_string(modem, "Address", value); g_free(value); - } else + } else { ofono_modem_set_string(modem, "Address", "127.0.0.1"); + } value = g_key_file_get_string(keyfile, group, "Port", NULL); if (value) { ofono_modem_set_integer(modem, "Port", atoi(value)); g_free(value); - } else + } else { ofono_modem_set_integer(modem, "Port", 12345); + } value = g_key_file_get_string(keyfile, group, "Modem", NULL); if (value) { diff --git a/plugins/phonesim.c b/plugins/phonesim.c index 4704c4f..6b5a0da 100644 --- a/plugins/phonesim.c +++ b/plugins/phonesim.c @@ -245,9 +245,10 @@ static int phonesim_enable(struct ofono_modem *modem) g_at_mux_setup_gsm0710(data->chat, mux_setup, modem, NULL); g_at_chat_unref(data->chat); data->chat = NULL; - } else + } else { g_at_chat_send(data->chat, "AT+CFUN=1", NULL, cfun_set_on_cb, modem, NULL); + } return -EINPROGRESS; } diff --git a/plugins/udev.c b/plugins/udev.c index 8bb2d65..9ab865b 100644 --- a/plugins/udev.c +++ b/plugins/udev.c @@ -115,8 +115,9 @@ static void add_mbm(struct ofono_modem *modem, devnode = udev_device_get_property_value(udev_device, "INTERFACE"); ofono_modem_set_string(modem, NETWORK_INTERFACE, devnode); - } else + } else { return; + } device = ofono_modem_get_string(modem, MODEM_DEVICE); network = ofono_modem_get_string(modem, NETWORK_INTERFACE); @@ -158,8 +159,9 @@ static void add_hso(struct ofono_modem *modem, devnode = udev_device_get_property_value(udev_device, "INTERFACE"); ofono_modem_set_string(modem, NETWORK_INTERFACE, devnode); - } else + } else { return; + } app = ofono_modem_get_string(modem, APPLICATION_PORT); control = ofono_modem_get_string(modem, CONTROL_PORT); -- 2.7.4