SS_SERVICE_REQ,
enable ? SS_ACTIVATION : SS_DEACTIVATION,
SS_ALL_TELE_AND_BEARER,
- ss_code >> 8, ss_code & 0xFF, /* Supplementary services code */
- SS_SEND_ADDITIONAL_INFO, /* ? */
- 1, /* Subblock count */
+ ss_code >> 8, ss_code & 0xFF, /* Service code */
+ SS_SEND_ADDITIONAL_INFO,
+ 1, /* Subblock count */
SS_GSM_PASSWORD,
- 28, /* Subblock length */
- 0, passwd[0], 0, passwd[1], /* Password */
+ 28, /* Subblock length */
+ 0, passwd[0], 0, passwd[1],
0, passwd[2], 0, passwd[3],
- 0, 0, 0, 0, 0, 0, 0, 0, /* Filler */
- 0, 0, 0, 0, 0, 0, 0, 0, /* Filler */
- 0, 0 /* Filler */
+ 0, 0, 0, 0, 0, 0, 0, 0, /* Filler */
+ 0, 0, 0, 0, 0, 0, 0, 0, /* Filler */
+ 0, 0 /* Filler */
};
DBG("lock code %s enable %d class %d password %s\n",
}
-static void isi_query(struct ofono_call_barring *barr, const char *lock, int cls,
- ofono_call_barring_query_cb_t cb, void *data)
+static void isi_query(struct ofono_call_barring *barr, const char *lock,
+ int cls, ofono_call_barring_query_cb_t cb, void *data)
{
struct barr_data *bd = ofono_call_barring_get_data(barr);
struct isi_cb_data *cbd = isi_cb_data_new(barr, cb, data);
SS_SERVICE_REQ,
SS_INTERROGATION,
SS_ALL_TELE_AND_BEARER,
- ss_code >> 8, ss_code & 0xFF, /* Supplementary services code */
- SS_SEND_ADDITIONAL_INFO, /* Get BER-encoded result, too */
+ ss_code >> 8, ss_code & 0xFF, /* services code */
+ SS_SEND_ADDITIONAL_INFO, /* Get BER-encoded result */
0 /* Subblock count */
};
SS_SERVICE_REQ,
SS_GSM_PASSWORD_REGISTRATION,
SS_ALL_TELE_AND_BEARER,
- ss_code >> 8, ss_code & 0xFF, /* Supplementary services code */
+ ss_code >> 8, ss_code & 0xFF, /* Service code */
SS_SEND_ADDITIONAL_INFO,
1, /* Subblock count */
SS_GSM_PASSWORD,
&ton, &norply, &number))
goto error;
- list.status = status & (SS_GSM_ACTIVE | SS_GSM_REGISTERED
+ list.status = status & (SS_GSM_ACTIVE
+ | SS_GSM_REGISTERED
| SS_GSM_PROVISIONED);
list.time = norply;
list.phone_number.type = ton | 128;
for (i = 0; i < count; i++) {
if (!g_isi_sb_iter_get_byte(&iter, &bsc, 3 + i))
goto error;
- update_status_mask(&mask, bsc);
+ update_status_mask(&mask, bsc);
}
break;
}
}
-static int isi_call_settings_probe(struct ofono_call_settings *cs, unsigned int vendor,
- void *user)
+static int isi_call_settings_probe(struct ofono_call_settings *cs,
+ unsigned int vendor, void *user)
{
GIsiModem *idx = user;
struct settings_data *data;
routing_resp_cb, cbs))
DBG("Failed to set CBS routing.");
- g_isi_subscribe(cd->client, SMS_GSM_CB_ROUTING_NTF, routing_ntf_cb, cbs);
+ g_isi_subscribe(cd->client, SMS_GSM_CB_ROUTING_NTF, routing_ntf_cb,
+ cbs);
return 0;
}
}
}
- if (j) {
+ if (j)
ofono_debug(" *%-48s : %.*s", hex, (int)k, ascii);
- }
}
void ss_debug(const void *restrict buf, size_t len, void *data)
}
static void activate_fail_ind_cb(GIsiClient *client, const void *restrict data,
- size_t len, uint16_t object, void *opaque)
+ size_t len, uint16_t object,
+ void *opaque)
{
const unsigned char *msg = data;
struct gprs_context_data *gcd = opaque;
GPDS_LL_PLAIN, /* link type */
};
- if(!check_resp(client, data, len, GPDS_CONTEXT_ID_CREATE_RESP, cd))
+ if (!check_resp(client, data, len, GPDS_CONTEXT_ID_CREATE_RESP, cd))
return gprs_up_fail(cd);
cd->handle = msg[1] = resp[1];
goto error;
cd->pipe = g_isi_pipe_create(gcd->idx, create_pipe_cb,
- g_isi_pep_get_object(cd->pep), gcd->gpds,
- PN_PEP_TYPE_GPRS, PN_PEP_TYPE_GPRS);
+ g_isi_pep_get_object(cd->pep),
+ gcd->gpds, PN_PEP_TYPE_GPRS,
+ PN_PEP_TYPE_GPRS);
if (cd->pipe == NULL)
goto error;
}
static bool context_deactivate_cb(GIsiClient *client, const void *restrict data,
- size_t len, uint16_t object, void *opaque)
+ size_t len, uint16_t object,
+ void *opaque)
{
struct context_data *cd = opaque;
struct ofono_gprs_context *gc = cd->driver;
struct isi_cb_data *cbd = opaque;
ofono_gprs_cb_t cb = cbd->cb;
- if(!msg) {
+ if (!msg) {
DBG("ISI client error: %d", g_isi_client_error(client));
goto error;
}
struct isi_cb_data *cbd = opaque;
ofono_gprs_cb_t cb = cbd->cb;
- if(!msg) {
+ if (!msg) {
DBG("ISI client error: %d", g_isi_client_error(client));
goto error;
}
}
static bool status_resp_cb(GIsiClient *client, const void *restrict data,
- size_t len, uint16_t object, void *opaque)
+ size_t len, uint16_t object, void *opaque)
{
const unsigned char *msg = data;
struct isi_cb_data *cbd = opaque;
ofono_gprs_status_cb_t cb = cbd->cb;
- if(!msg) {
+ if (!msg) {
DBG("ISI client error: %d", g_isi_client_error(client));
goto error;
}
if (!cbd)
goto error;
- if (g_isi_request_make(gd->client, msg, sizeof(msg), GPDS_TIMEOUT,
- status_resp_cb, cbd))
- return;
+ if (!g_isi_request_make(gd->client, msg, sizeof(msg), GPDS_TIMEOUT,
+ status_resp_cb, cbd))
+ return;
error:
CALLBACK_WITH_FAILURE(cb, -1, data);
#include "info.h"
#include "infoserver.h"
-struct isi_infoserver
-{
+struct isi_infoserver {
GIsiServer *server;
- unsigned sv; /* Software version in 0..98 */
+ unsigned sv; /* Software version in 0..98 */
};
static bool serial_number_read_req(GIsiServer *server, void const *data,
static void set_power_by_mtc_state(struct isi_data *isi, int state)
{
- switch (isi->mtc_state = state)
- {
+ switch (isi->mtc_state = state) {
case MTC_STATE_NONE:
case MTC_POWER_OFF:
case MTC_CHARGING:
MTC_STATE_QUERY_REQ, 0x00, 0x00
};
- if (!isi-> iface_up)
+ if (!isi->iface_up)
return true;
isi->interval *= 2;
e.type = OFONO_ERROR_TYPE_FAILURE; \
e.error = 0; \
f(&e, ##args); \
- } while(0)
+ } while (0)
#define CALLBACK_WITH_SUCCESS(f, args...) \
do { \
e.type = OFONO_ERROR_TYPE_NO_ERROR; \
e.error = 0; \
f(&e, ##args); \
- } while(0)
+ } while (0)
#endif /* !__ISIMODEM_UTIL_H */
switch (g_isi_sb_iter_get_id(&iter)) {
case NET_GSM_OPERATOR_INFO:
- if (!g_isi_sb_iter_get_oper_code(&iter, op.mcc, op.mnc, 2))
+ if (!g_isi_sb_iter_get_oper_code(&iter, op.mcc,
+ op.mnc, 2))
goto error;
break;
struct netreg_data *nd = ofono_netreg_get_data(netreg);
ofono_netreg_register_cb_t cb = cbd->cb;
- if(!msg) {
+ if (!msg) {
DBG("ISI client error: %d", g_isi_client_error(client));
goto error;
}
char *name = NULL;
char *number = NULL;
- char *sne= NULL;
+ char *sne = NULL;
char *anr = NULL;
char *email = NULL;
case SIM_PB_STATUS:
if (!g_isi_sb_iter_get_byte(&iter, &status, 4))
- goto error;
+ goto error;
break;
return location;
}
-static void read_next_entry(GIsiClient *client, int location, GIsiResponseFunc read_cb, struct isi_cb_data *cbd)
+static void read_next_entry(GIsiClient *client, int location,
+ GIsiResponseFunc read_cb,
+ struct isi_cb_data *cbd)
{
ofono_phonebook_cb_t cb = cbd->cb;
const unsigned char msg[] = {
0, SIM_PB_LOCATION_SEARCH, /* subblock id */
0, 8, /* subblock size */
0, SIM_PB_ADN,
- location >> 8, location & 0xFF, /* read next entry after specified by location */
+ location >> 8, location & 0xFF, /* read next entry after
+ * specified by location */
0, SIM_PB_INFO_REQUEST, /* subblock id */
0, 16, /* subblock size */
4, /* number of tags */
ofono_phonebook_cb_t cb = cbd->cb;
int location;
- if(!msg) {
+ if (!msg) {
DBG("ISI client error: %d", g_isi_client_error(client));
goto error;
}
}
static bool rat_mode_read_resp_cb(GIsiClient *client, const void *restrict data,
- size_t len, uint16_t object, void *opaque)
+ size_t len, uint16_t object,
+ void *opaque)
{
const unsigned char *msg = data;
struct isi_cb_data *cbd = opaque;
}
default:
DBG("Skipping sub-block: %s (%zu bytes)",
- gss_subblock_name(g_isi_sb_iter_get_id(&iter)),
+ gss_subblock_name(
+ g_isi_sb_iter_get_id(&iter)),
g_isi_sb_iter_get_len(&iter));
break;
}
g_free(cbd);
}
-static bool rat_mode_write_resp_cb(GIsiClient *client, const void *restrict data,
- size_t len, uint16_t object, void *opaque)
+static bool mode_write_resp_cb(GIsiClient *client, const void *restrict data,
+ size_t len, uint16_t object, void *opaque)
{
const unsigned char *msg = data;
struct isi_cb_data *cbd = opaque;
goto error;
if (g_isi_request_make(rd->client, msg, sizeof(msg), GSS_TIMEOUT,
- rat_mode_write_resp_cb, cbd))
+ mode_write_resp_cb, cbd))
return;
error:
DBG("");
- if(!msg) {
+ if (!msg) {
DBG("ISI client error: %d", g_isi_client_error(client));
goto error;
}