Style: Repeat for plugins

This commit is contained in:
Denis Kenzior 2009-12-17 21:33:48 -06:00
parent 955e6a61ee
commit 57512ad924
5 changed files with 14 additions and 7 deletions

View File

@ -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);

View File

@ -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);
}

View File

@ -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) {

View File

@ -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;
}

View File

@ -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);