mirror of git://git.sysmocom.de/ofono
ubloxmodem: Fixup minor style issues
- useless return at the end of a function - mixed tabs & spaces for indentation - over 80 characters for the comment - line > 80 characters due to access technology conversion. Replaced with a direct assignment.
This commit is contained in:
parent
83783a71d8
commit
3c473979c7
|
@ -196,8 +196,8 @@ static void cesq_cb(gboolean ok, GAtResult *result, gpointer user_data)
|
||||||
}
|
}
|
||||||
|
|
||||||
for (idx = 0; idx < _MAX; idx++) {
|
for (idx = 0; idx < _MAX; idx++) {
|
||||||
|
|
||||||
ok = g_at_result_iter_next_number(&iter, &number);
|
ok = g_at_result_iter_next_number(&iter, &number);
|
||||||
|
|
||||||
if (!ok) {
|
if (!ok) {
|
||||||
/* Ignore and do not fail */
|
/* Ignore and do not fail */
|
||||||
DBG(" CESQ: error parsing idx: %d ", idx);
|
DBG(" CESQ: error parsing idx: %d ", idx);
|
||||||
|
@ -233,10 +233,12 @@ static void cesq_cb(gboolean ok, GAtResult *result, gpointer user_data)
|
||||||
DBG(" RSRQ %d ", cbd->rsrq);
|
DBG(" RSRQ %d ", cbd->rsrq);
|
||||||
DBG(" RSRP %d ", cbd->rsrp);
|
DBG(" RSRP %d ", cbd->rsrp);
|
||||||
|
|
||||||
/* We never fail at this point we always send what we collected so far */
|
/*
|
||||||
|
* We never fail at this point we always send what we collected so
|
||||||
|
* far
|
||||||
|
*/
|
||||||
out:
|
out:
|
||||||
ublox_netmon_finish_success(cbd);
|
ublox_netmon_finish_success(cbd);
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void cops_cb(gboolean ok, GAtResult *result, gpointer user_data)
|
static void cops_cb(gboolean ok, GAtResult *result, gpointer user_data)
|
||||||
|
@ -271,13 +273,13 @@ static void cops_cb(gboolean ok, GAtResult *result, gpointer user_data)
|
||||||
|
|
||||||
/* Default to GSM */
|
/* Default to GSM */
|
||||||
if (g_at_result_iter_next_number(&iter, &tech) == FALSE)
|
if (g_at_result_iter_next_number(&iter, &tech) == FALSE)
|
||||||
cbd->op.tech = ublox_map_radio_access_technology(ACCESS_TECHNOLOGY_GSM);
|
cbd->op.tech = OFONO_NETMON_CELL_TYPE_GSM;
|
||||||
else
|
else
|
||||||
cbd->op.tech = ublox_map_radio_access_technology(tech);
|
cbd->op.tech = ublox_map_radio_access_technology(tech);
|
||||||
|
|
||||||
cbd = req_cb_data_ref(cbd);
|
cbd = req_cb_data_ref(cbd);
|
||||||
if (g_at_chat_send(nmd->chat, "AT+CESQ", cesq_prefix,
|
if (g_at_chat_send(nmd->chat, "AT+CESQ", cesq_prefix,
|
||||||
cesq_cb, cbd, req_cb_data_unref) == 0) {
|
cesq_cb, cbd, req_cb_data_unref) == 0) {
|
||||||
CALLBACK_WITH_FAILURE(cbd->cb, cbd->data);
|
CALLBACK_WITH_FAILURE(cbd->cb, cbd->data);
|
||||||
req_cb_data_unref(cbd);
|
req_cb_data_unref(cbd);
|
||||||
}
|
}
|
||||||
|
@ -294,7 +296,7 @@ static void ublox_netmon_request_update(struct ofono_netmon *netmon,
|
||||||
cbd = req_cb_data_new0(cb, data, netmon);
|
cbd = req_cb_data_new0(cb, data, netmon);
|
||||||
|
|
||||||
if (g_at_chat_send(nmd->chat, "AT+COPS?", cops_prefix,
|
if (g_at_chat_send(nmd->chat, "AT+COPS?", cops_prefix,
|
||||||
cops_cb, cbd, req_cb_data_unref) == 0) {
|
cops_cb, cbd, req_cb_data_unref) == 0) {
|
||||||
CALLBACK_WITH_FAILURE(cbd->cb, cbd->data);
|
CALLBACK_WITH_FAILURE(cbd->cb, cbd->data);
|
||||||
req_cb_data_unref(cbd);
|
req_cb_data_unref(cbd);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue