mirror of git://git.sysmocom.de/ofono
Style: Trailing whitespace & extra lines
This commit is contained in:
parent
bb0dfd9b6d
commit
9bed04ca2f
|
@ -160,7 +160,7 @@ gboolean at_util_parse_reg_unsolicited(GAtResult *result, const char *prefix,
|
||||||
|
|
||||||
if (g_at_result_iter_next(&iter, prefix) == FALSE)
|
if (g_at_result_iter_next(&iter, prefix) == FALSE)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
if (g_at_result_iter_next_number(&iter, &s) == FALSE)
|
if (g_at_result_iter_next_number(&iter, &s) == FALSE)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
|
@ -240,6 +240,6 @@ out:
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
|
@ -232,7 +232,7 @@ static bool query_resp_cb(GIsiClient *client, const void *restrict data,
|
||||||
if (!g_isi_sb_iter_get_byte(&iter, &bsc, 3 + i))
|
if (!g_isi_sb_iter_get_byte(&iter, &bsc, 3 + i))
|
||||||
goto error;
|
goto error;
|
||||||
|
|
||||||
update_status_mask(&mask, bsc);
|
update_status_mask(&mask, bsc);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -153,7 +153,7 @@ static void netlink_status_cb(bool up, uint8_t addr, GIsiModem *idx,
|
||||||
|
|
||||||
DBG("PhoNet is %s, addr=0x%02x, idx=%p",
|
DBG("PhoNet is %s, addr=0x%02x, idx=%p",
|
||||||
up ? "up" : "down", addr, idx);
|
up ? "up" : "down", addr, idx);
|
||||||
|
|
||||||
if (up) {
|
if (up) {
|
||||||
|
|
||||||
if (isi) {
|
if (isi) {
|
||||||
|
@ -181,7 +181,6 @@ static void netlink_status_cb(bool up, uint8_t addr, GIsiModem *idx,
|
||||||
DBG("Done regging modem");
|
DBG("Done regging modem");
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
if (!isi) {
|
if (!isi) {
|
||||||
DBG("Unknown modem: (0x%02x)",
|
DBG("Unknown modem: (0x%02x)",
|
||||||
g_isi_modem_index(idx));
|
g_isi_modem_index(idx));
|
||||||
|
|
|
@ -267,7 +267,7 @@ error:
|
||||||
if (cbd)
|
if (cbd)
|
||||||
g_free(cbd);
|
g_free(cbd);
|
||||||
|
|
||||||
CALLBACK_WITH_FAILURE(cb, -1, -1, -1, -1, data);
|
CALLBACK_WITH_FAILURE(cb, -1, -1, -1, -1, data);
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool name_get_resp_cb(GIsiClient *client, const void *restrict data,
|
static bool name_get_resp_cb(GIsiClient *client, const void *restrict data,
|
||||||
|
@ -334,7 +334,7 @@ static bool name_get_resp_cb(GIsiClient *client, const void *restrict data,
|
||||||
|
|
||||||
CALLBACK_WITH_SUCCESS(cb, &op, cbd->data);
|
CALLBACK_WITH_SUCCESS(cb, &op, cbd->data);
|
||||||
goto out;
|
goto out;
|
||||||
|
|
||||||
error:
|
error:
|
||||||
CALLBACK_WITH_FAILURE(cb, NULL, cbd->data);
|
CALLBACK_WITH_FAILURE(cb, NULL, cbd->data);
|
||||||
|
|
||||||
|
@ -618,7 +618,7 @@ static void isi_register_manual(struct ofono_netreg *netreg,
|
||||||
0x08, /* Sub-block length */
|
0x08, /* Sub-block length */
|
||||||
bcd[0], bcd[1], bcd[2],
|
bcd[0], bcd[1], bcd[2],
|
||||||
NET_GSM_BAND_INFO_NOT_AVAIL, /* Pick any supported band */
|
NET_GSM_BAND_INFO_NOT_AVAIL, /* Pick any supported band */
|
||||||
0x00, 0x00 /* Filler */
|
0x00, 0x00 /* Filler */
|
||||||
};
|
};
|
||||||
|
|
||||||
if (!cbd)
|
if (!cbd)
|
||||||
|
@ -650,7 +650,7 @@ static void rat_ind_cb(GIsiClient *client, const void *restrict data,
|
||||||
struct netreg_data *nd = ofono_netreg_get_data(netreg);
|
struct netreg_data *nd = ofono_netreg_get_data(netreg);
|
||||||
|
|
||||||
GIsiSubBlockIter iter;
|
GIsiSubBlockIter iter;
|
||||||
|
|
||||||
if (!msg || len < 3 || msg[0] != NET_RAT_IND)
|
if (!msg || len < 3 || msg[0] != NET_RAT_IND)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
@ -662,7 +662,7 @@ static void rat_ind_cb(GIsiClient *client, const void *restrict data,
|
||||||
|
|
||||||
case NET_RAT_INFO: {
|
case NET_RAT_INFO: {
|
||||||
guint8 info = 0;
|
guint8 info = 0;
|
||||||
|
|
||||||
if (!g_isi_sb_iter_get_byte(&iter, &nd->rat, 2))
|
if (!g_isi_sb_iter_get_byte(&iter, &nd->rat, 2))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
@ -716,7 +716,7 @@ static bool rat_resp_cb(GIsiClient *client, const void *restrict data,
|
||||||
|
|
||||||
case NET_RAT_INFO: {
|
case NET_RAT_INFO: {
|
||||||
guint8 info = 0;
|
guint8 info = 0;
|
||||||
|
|
||||||
if (!g_isi_sb_iter_get_byte(&iter, &nd->rat, 2)
|
if (!g_isi_sb_iter_get_byte(&iter, &nd->rat, 2)
|
||||||
|| !g_isi_sb_iter_get_byte(&iter, &info, 3)
|
|| !g_isi_sb_iter_get_byte(&iter, &info, 3)
|
||||||
|| !info
|
|| !info
|
||||||
|
|
|
@ -222,7 +222,7 @@ static bool imsi_resp_cb(GIsiClient *client, const void *restrict data,
|
||||||
octets = msg[3];
|
octets = msg[3];
|
||||||
if (octets != 8 || octets > len)
|
if (octets != 8 || octets > len)
|
||||||
goto error;
|
goto error;
|
||||||
|
|
||||||
msg += 4;
|
msg += 4;
|
||||||
|
|
||||||
/* Ignore the low-order semi-octet of the first byte */
|
/* Ignore the low-order semi-octet of the first byte */
|
||||||
|
@ -263,7 +263,7 @@ static void isi_read_imsi(struct ofono_sim *sim,
|
||||||
if (!cbd)
|
if (!cbd)
|
||||||
goto error;
|
goto error;
|
||||||
|
|
||||||
if (g_isi_request_make(sd->client, msg, sizeof(msg),
|
if (g_isi_request_make(sd->client, msg, sizeof(msg),
|
||||||
SIM_TIMEOUT,
|
SIM_TIMEOUT,
|
||||||
imsi_resp_cb, cbd))
|
imsi_resp_cb, cbd))
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -147,7 +147,7 @@ static void mbm_get_ip_details(struct ofono_gprs_context *gc)
|
||||||
{
|
{
|
||||||
struct gprs_context_data *gcd = ofono_gprs_context_get_data(gc);
|
struct gprs_context_data *gcd = ofono_gprs_context_get_data(gc);
|
||||||
struct ofono_modem *modem;
|
struct ofono_modem *modem;
|
||||||
const char *interface;
|
const char *interface;
|
||||||
|
|
||||||
if (gcd->have_e2ipcfg) {
|
if (gcd->have_e2ipcfg) {
|
||||||
g_at_chat_send(gcd->chat, "AT*E2IPCFG?", e2ipcfg_prefix,
|
g_at_chat_send(gcd->chat, "AT*E2IPCFG?", e2ipcfg_prefix,
|
||||||
|
@ -253,13 +253,13 @@ static void at_enap_down_cb(gboolean ok, GAtResult *result, gpointer user_data)
|
||||||
struct ofono_gprs_context *gc = cbd->user;
|
struct ofono_gprs_context *gc = cbd->user;
|
||||||
struct gprs_context_data *gcd = ofono_gprs_context_get_data(gc);
|
struct gprs_context_data *gcd = ofono_gprs_context_get_data(gc);
|
||||||
struct ofono_error error;
|
struct ofono_error error;
|
||||||
|
|
||||||
/* Now we have to wait for the unsolicited notification to arrive */
|
/* Now we have to wait for the unsolicited notification to arrive */
|
||||||
if (ok && gcd->enap != 0) {
|
if (ok && gcd->enap != 0) {
|
||||||
gcd->mbm_state = MBM_DISABLING;
|
gcd->mbm_state = MBM_DISABLING;
|
||||||
gcd->down_cb = cb;
|
gcd->down_cb = cb;
|
||||||
gcd->cb_data = cbd->data;
|
gcd->cb_data = cbd->data;
|
||||||
|
|
||||||
if (gcd->have_e2nap == FALSE)
|
if (gcd->have_e2nap == FALSE)
|
||||||
g_at_chat_send(gcd->chat, "AT*ENAP?", enap_prefix,
|
g_at_chat_send(gcd->chat, "AT*ENAP?", enap_prefix,
|
||||||
mbm_enap_poll_cb, gc, NULL);
|
mbm_enap_poll_cb, gc, NULL);
|
||||||
|
@ -356,7 +356,7 @@ static void mbm_gprs_activate_primary(struct ofono_gprs_context *gc,
|
||||||
if (g_at_chat_send(gcd->chat, buf, none_prefix,
|
if (g_at_chat_send(gcd->chat, buf, none_prefix,
|
||||||
NULL, NULL, NULL) == 0)
|
NULL, NULL, NULL) == 0)
|
||||||
goto error;
|
goto error;
|
||||||
|
|
||||||
len = sprintf(buf, "AT+CGDCONT=%u,\"IP\"", ctx->cid);
|
len = sprintf(buf, "AT+CGDCONT=%u,\"IP\"", ctx->cid);
|
||||||
|
|
||||||
if (ctx->apn)
|
if (ctx->apn)
|
||||||
|
|
12
plugins/g1.c
12
plugins/g1.c
|
@ -66,10 +66,10 @@ static int g1_probe(struct ofono_modem *modem)
|
||||||
static void g1_remove(struct ofono_modem *modem)
|
static void g1_remove(struct ofono_modem *modem)
|
||||||
{
|
{
|
||||||
GAtChat *chat = ofono_modem_get_data(modem);
|
GAtChat *chat = ofono_modem_get_data(modem);
|
||||||
|
|
||||||
DBG("");
|
DBG("");
|
||||||
|
|
||||||
if (chat) {
|
if (chat) {
|
||||||
g_at_chat_unref(chat);
|
g_at_chat_unref(chat);
|
||||||
ofono_modem_set_data(modem, NULL);
|
ofono_modem_set_data(modem, NULL);
|
||||||
}
|
}
|
||||||
|
@ -78,7 +78,7 @@ static void g1_remove(struct ofono_modem *modem)
|
||||||
static void cfun_set_on_cb(gboolean ok, GAtResult *result, gpointer user_data)
|
static void cfun_set_on_cb(gboolean ok, GAtResult *result, gpointer user_data)
|
||||||
{
|
{
|
||||||
struct ofono_modem *modem = user_data;
|
struct ofono_modem *modem = user_data;
|
||||||
|
|
||||||
DBG("");
|
DBG("");
|
||||||
|
|
||||||
if (ok)
|
if (ok)
|
||||||
|
@ -129,9 +129,9 @@ static void cfun_set_off_cb(gboolean ok, GAtResult *result, gpointer user_data)
|
||||||
{
|
{
|
||||||
struct ofono_modem *modem = user_data;
|
struct ofono_modem *modem = user_data;
|
||||||
GAtChat *chat = ofono_modem_get_data(modem);
|
GAtChat *chat = ofono_modem_get_data(modem);
|
||||||
|
|
||||||
DBG("");
|
DBG("");
|
||||||
|
|
||||||
g_at_chat_unref(chat);
|
g_at_chat_unref(chat);
|
||||||
ofono_modem_set_data(modem, NULL);
|
ofono_modem_set_data(modem, NULL);
|
||||||
|
|
||||||
|
|
|
@ -915,7 +915,7 @@ out:
|
||||||
* that time
|
* that time
|
||||||
*/
|
*/
|
||||||
if (lac_changed || ci_changed) {
|
if (lac_changed || ci_changed) {
|
||||||
cbs->reset_source =
|
cbs->reset_source =
|
||||||
g_timeout_add_seconds(3, reset_base_station_name, cbs);
|
g_timeout_add_seconds(3, reset_base_station_name, cbs);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -492,7 +492,7 @@ static unsigned short gsm_single_shift_lookup(unsigned char k,
|
||||||
struct codepoint key = { k, 0 };
|
struct codepoint key = { k, 0 };
|
||||||
const struct codepoint *table;
|
const struct codepoint *table;
|
||||||
unsigned int len;
|
unsigned int len;
|
||||||
|
|
||||||
table = alphabet_lookup[lang].togsm_single_shift;
|
table = alphabet_lookup[lang].togsm_single_shift;
|
||||||
len = alphabet_lookup[lang].togsm_single_shift_len;
|
len = alphabet_lookup[lang].togsm_single_shift_len;
|
||||||
|
|
||||||
|
@ -508,7 +508,7 @@ static unsigned short unicode_locking_shift_lookup(unsigned short k,
|
||||||
|
|
||||||
table = alphabet_lookup[lang].tounicode_locking_shift;
|
table = alphabet_lookup[lang].tounicode_locking_shift;
|
||||||
|
|
||||||
return codepoint_lookup(&key, table, len);
|
return codepoint_lookup(&key, table, len);
|
||||||
}
|
}
|
||||||
|
|
||||||
static unsigned short unicode_single_shift_lookup(unsigned short k,
|
static unsigned short unicode_single_shift_lookup(unsigned short k,
|
||||||
|
|
Loading…
Reference in New Issue