debug logs

This commit is contained in:
2025-10-30 01:02:24 +08:00
parent ded0ec01b9
commit 342e18c37e
30 changed files with 837 additions and 0 deletions

View File

@@ -444,6 +444,7 @@ static inline void property_append_cf_condition(DBusMessageIter *dict, int cls,
const char *value,
dbus_uint16_t timeout)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
char attr[64];
char tattr[64];
int addt = !strcmp(postfix, "NoReply");
@@ -465,6 +466,7 @@ static void property_append_cf_conditions(DBusMessageIter *dict,
GSList *cf_list, int mask,
const char *postfix)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
GSList *l;
int i;
struct ofono_call_forwarding_condition *cf;
@@ -493,6 +495,7 @@ static void property_append_cf_conditions(DBusMessageIter *dict,
static DBusMessage *cf_get_properties_reply(DBusMessage *msg,
struct ofono_call_forwarding *cf)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
DBusMessage *reply;
DBusMessageIter iter;
DBusMessageIter dict;
@@ -543,6 +546,7 @@ static DBusMessage *cf_get_properties_reply(DBusMessage *msg,
static void cf_send_properties(gpointer data, gpointer user_data)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
DBusMessage *msg = data;
DBusMessage *reply = cf_get_properties_reply(msg, user_data);
@@ -553,6 +557,7 @@ static void get_query_cf_callback(const struct ofono_error *error, int total,
const struct ofono_call_forwarding_condition *list,
void *data)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
struct ofono_call_forwarding *cf = data;
if (error->type == OFONO_ERROR_TYPE_NO_ERROR) {
@@ -581,6 +586,7 @@ static void get_query_cf_callback(const struct ofono_error *error, int total,
static inline void get_query_next_cf_cond(struct ofono_call_forwarding *cf)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
cf->driver->query(cf, cf->query_next, BEARER_CLASS_DEFAULT,
get_query_cf_callback, cf);
}
@@ -588,6 +594,7 @@ static inline void get_query_next_cf_cond(struct ofono_call_forwarding *cf)
static DBusMessage *cf_get_properties(DBusConnection *conn, DBusMessage *msg,
void *data)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
struct ofono_call_forwarding *cf = data;
struct ofono_modem *modem = __ofono_atom_get_modem(cf->atom);
@@ -620,6 +627,7 @@ static DBusMessage *cf_get_properties(DBusConnection *conn, DBusMessage *msg,
static gboolean cf_condition_enabled_property(struct ofono_call_forwarding *cf,
const char *property, int *out_type, int *out_cls)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
int i;
int j;
int len;
@@ -651,6 +659,7 @@ static gboolean cf_condition_enabled_property(struct ofono_call_forwarding *cf,
static gboolean cf_condition_timeout_property(const char *property,
int *out_cls)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
int i;
int len;
const char *prefix;
@@ -676,6 +685,7 @@ static void set_query_cf_callback(const struct ofono_error *error, int total,
const struct ofono_call_forwarding_condition *list,
void *data)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
struct ofono_call_forwarding *cf = data;
if (error->type != OFONO_ERROR_TYPE_NO_ERROR) {
@@ -704,12 +714,14 @@ static void set_query_cf_callback(const struct ofono_error *error, int total,
static void set_query_next_cf_cond(struct ofono_call_forwarding *cf)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
cf->driver->query(cf, cf->query_next, BEARER_CLASS_DEFAULT,
set_query_cf_callback, cf);
}
static void set_property_callback(const struct ofono_error *error, void *data)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
struct ofono_call_forwarding *cf = data;
if (error->type != OFONO_ERROR_TYPE_NO_ERROR) {
@@ -729,6 +741,7 @@ static DBusMessage *set_property_request(struct ofono_call_forwarding *cf,
struct ofono_phone_number *ph,
int timeout)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
if (ph->number[0] != '\0' && cf->driver->registration == NULL)
return __ofono_error_not_implemented(msg);
@@ -757,6 +770,7 @@ static DBusMessage *set_property_request(struct ofono_call_forwarding *cf,
static DBusMessage *cf_set_property(DBusConnection *conn, DBusMessage *msg,
void *data)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
struct ofono_call_forwarding *cf = data;
struct ofono_modem *modem = __ofono_atom_get_modem(cf->atom);
DBusMessageIter iter;
@@ -845,6 +859,7 @@ static DBusMessage *cf_set_property(DBusConnection *conn, DBusMessage *msg,
static void disable_conditional_callback(const struct ofono_error *error,
void *data)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
struct ofono_call_forwarding *cf = data;
if (error->type != OFONO_ERROR_TYPE_NO_ERROR) {
@@ -863,6 +878,7 @@ static void disable_conditional_callback(const struct ofono_error *error,
static void disable_all_callback(const struct ofono_error *error, void *data)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
struct ofono_call_forwarding *cf = data;
if (error->type != OFONO_ERROR_TYPE_NO_ERROR) {
@@ -882,6 +898,7 @@ static void disable_all_callback(const struct ofono_error *error, void *data)
static DBusMessage *cf_disable_all(DBusConnection *conn, DBusMessage *msg,
void *data)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
struct ofono_call_forwarding *cf = data;
const char *strtype;
int type;
@@ -938,6 +955,7 @@ static const GDBusSignalTable cf_signals[] = {
static DBusMessage *cf_ss_control_reply(struct ofono_call_forwarding *cf,
struct cf_ss_request *req)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
const char *context = "CallForwarding";
const char *sig = "(ssa{sv})";
const char *ss_type = ss_control_type_to_string(req->ss_type);
@@ -1011,6 +1029,7 @@ static void ss_set_query_cf_callback(const struct ofono_error *error, int total,
const struct ofono_call_forwarding_condition *list,
void *data)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
struct ofono_call_forwarding *cf = data;
GSList *l;
DBusMessage *reply;
@@ -1047,6 +1066,7 @@ static void ss_set_query_cf_callback(const struct ofono_error *error, int total,
static void ss_set_query_next_cf_cond(struct ofono_call_forwarding *cf)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
int cls;
cls = (cf->ss_req->ss_type == SS_CONTROL_TYPE_QUERY) ?
@@ -1061,6 +1081,7 @@ static void ss_set_query_next_cf_cond(struct ofono_call_forwarding *cf)
static void cf_ss_control_callback(const struct ofono_error *error, void *data)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
struct ofono_call_forwarding *cf = data;
if (error->type != OFONO_ERROR_TYPE_NO_ERROR) {
@@ -1082,6 +1103,7 @@ static gboolean cf_ss_control(int type, const char *sc,
const char *sic, const char *dn,
DBusMessage *msg, void *data)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
struct ofono_call_forwarding *cf = data;
DBusConnection *conn = ofono_dbus_get_connection();
int cls = BEARER_CLASS_SS_DEFAULT;
@@ -1274,6 +1296,7 @@ error:
static void cf_register_ss_controls(struct ofono_call_forwarding *cf)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
__ofono_ussd_ssc_register(cf->ussd, "21", cf_ss_control, cf, NULL);
__ofono_ussd_ssc_register(cf->ussd, "67", cf_ss_control, cf, NULL);
__ofono_ussd_ssc_register(cf->ussd, "61", cf_ss_control, cf, NULL);
@@ -1285,6 +1308,7 @@ static void cf_register_ss_controls(struct ofono_call_forwarding *cf)
static void cf_unregister_ss_controls(struct ofono_call_forwarding *cf)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
__ofono_ussd_ssc_unregister(cf->ussd, "21");
__ofono_ussd_ssc_unregister(cf->ussd, "67");
__ofono_ussd_ssc_unregister(cf->ussd, "61");
@@ -1296,6 +1320,7 @@ static void cf_unregister_ss_controls(struct ofono_call_forwarding *cf)
gboolean __ofono_call_forwarding_is_busy(struct ofono_call_forwarding *cf)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
return cf->pending || cf->pending_get_prop;
}
@@ -1303,6 +1328,7 @@ static void sim_cfis_read_cb(int ok, int total_length, int record,
const unsigned char *data,
int record_length, void *userdata)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
struct ofono_call_forwarding *cf = userdata;
DBusConnection *conn = ofono_dbus_get_connection();
const char *path = __ofono_atom_get_path(cf->atom);
@@ -1378,6 +1404,7 @@ static void sim_cphs_cff_read_cb(int ok, int total_length, int record,
const unsigned char *data,
int record_length, void *userdata)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
struct ofono_call_forwarding *cf = userdata;
DBusConnection *conn = ofono_dbus_get_connection();
const char *path = __ofono_atom_get_path(cf->atom);
@@ -1408,6 +1435,7 @@ static void sim_cphs_cff_read_cb(int ok, int total_length, int record,
static void cf_cancel_get_prop(gpointer data)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
DBusMessage *msg = data;
__ofono_dbus_pending_reply(&msg, __ofono_error_canceled(msg));
@@ -1415,6 +1443,7 @@ static void cf_cancel_get_prop(gpointer data)
static void call_forwarding_unregister(struct ofono_atom *atom)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
struct ofono_call_forwarding *cf = __ofono_atom_get_data(atom);
const char *path = __ofono_atom_get_path(cf->atom);
DBusConnection *conn = ofono_dbus_get_connection();
@@ -1445,6 +1474,7 @@ static void call_forwarding_unregister(struct ofono_atom *atom)
static void sim_cfis_changed(int id, void *userdata)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
struct ofono_call_forwarding *cf = userdata;
if (!(cf->flags & CALL_FORWARDING_FLAG_CACHED))
@@ -1466,6 +1496,7 @@ static void sim_cfis_changed(int id, void *userdata)
static void sim_read_cf_indicator(struct ofono_call_forwarding *cf)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
if (__ofono_sim_service_available(cf->sim,
SIM_UST_SERVICE_CFIS,
SIM_SST_SERVICE_CFIS) == TRUE) {
@@ -1487,6 +1518,7 @@ static void sim_read_cf_indicator(struct ofono_call_forwarding *cf)
int ofono_call_forwarding_driver_register(
const struct ofono_call_forwarding_driver *d)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
DBG("driver: %p, name: %s", d, d->name);
if (d->probe == NULL)
@@ -1500,6 +1532,7 @@ int ofono_call_forwarding_driver_register(
void ofono_call_forwarding_driver_unregister(
const struct ofono_call_forwarding_driver *d)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
DBG("driver: %p, name: %s", d, d->name);
g_drivers = g_slist_remove(g_drivers, (void *) d);
@@ -1507,6 +1540,7 @@ void ofono_call_forwarding_driver_unregister(
static void call_forwarding_remove(struct ofono_atom *atom)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
struct ofono_call_forwarding *cf = __ofono_atom_get_data(atom);
DBG("atom: %p", atom);
@@ -1527,6 +1561,7 @@ struct ofono_call_forwarding *ofono_call_forwarding_create(
unsigned int vendor,
const char *driver, void *data)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
struct ofono_call_forwarding *cf;
GSList *l;
@@ -1560,6 +1595,7 @@ struct ofono_call_forwarding *ofono_call_forwarding_create(
static void ussd_watch(struct ofono_atom *atom,
enum ofono_atom_watch_condition cond, void *data)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
struct ofono_call_forwarding *cf = data;
if (cond == OFONO_ATOM_WATCH_CONDITION_UNREGISTERED) {
@@ -1573,6 +1609,7 @@ static void ussd_watch(struct ofono_atom *atom,
void ofono_call_forwarding_register(struct ofono_call_forwarding *cf)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
DBusConnection *conn = ofono_dbus_get_connection();
const char *path = __ofono_atom_get_path(cf->atom);
struct ofono_modem *modem = __ofono_atom_get_modem(cf->atom);
@@ -1604,16 +1641,19 @@ void ofono_call_forwarding_register(struct ofono_call_forwarding *cf)
void ofono_call_forwarding_remove(struct ofono_call_forwarding *cf)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
__ofono_atom_free(cf->atom);
}
void ofono_call_forwarding_set_data(struct ofono_call_forwarding *cf,
void *data)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
cf->driver_data = data;
}
void *ofono_call_forwarding_get_data(struct ofono_call_forwarding *cf)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
return cf->driver_data;
}

View File

@@ -55,6 +55,7 @@ struct ofono_call_meter {
static void set_call_meter(struct ofono_call_meter *cm, int value)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
DBusConnection *conn;
const char *path;
@@ -74,6 +75,7 @@ static void set_call_meter(struct ofono_call_meter *cm, int value)
static void set_acm(struct ofono_call_meter *cm, int value)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
DBusConnection *conn;
const char *path;
@@ -93,6 +95,7 @@ static void set_acm(struct ofono_call_meter *cm, int value)
static void set_acm_max(struct ofono_call_meter *cm, int value)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
DBusConnection *conn;
const char *path;
@@ -112,6 +115,7 @@ static void set_acm_max(struct ofono_call_meter *cm, int value)
static void set_ppu(struct ofono_call_meter *cm, double value)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
DBusConnection *conn;
const char *path;
@@ -131,6 +135,7 @@ static void set_ppu(struct ofono_call_meter *cm, double value)
static void set_currency(struct ofono_call_meter *cm, const char *value)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
DBusConnection *conn;
const char *path;
const char *dbusval;
@@ -158,6 +163,7 @@ static void set_currency(struct ofono_call_meter *cm, const char *value)
static void cm_get_properties_reply(struct ofono_call_meter *cm)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
DBusMessage *reply;
DBusMessageIter iter, dict;
const char *currency = cm->currency;
@@ -194,6 +200,7 @@ static void cm_get_properties_reply(struct ofono_call_meter *cm)
static void query_call_meter_callback(const struct ofono_error *error,
int value, void *data)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
struct ofono_call_meter *cm = data;
if (error->type == OFONO_ERROR_TYPE_NO_ERROR)
@@ -205,6 +212,7 @@ static void query_call_meter_callback(const struct ofono_error *error,
static void query_call_meter(struct ofono_call_meter *cm)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
if (cm->driver->call_meter_query == NULL) {
if (cm->pending)
cm_get_properties_reply(cm);
@@ -218,6 +226,7 @@ static void query_call_meter(struct ofono_call_meter *cm)
static void query_acm_callback(const struct ofono_error *error, int value,
void *data)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
struct ofono_call_meter *cm = data;
if (error->type == OFONO_ERROR_TYPE_NO_ERROR)
@@ -228,6 +237,7 @@ static void query_acm_callback(const struct ofono_error *error, int value,
static void query_acm(struct ofono_call_meter *cm)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
if (cm->driver->acm_query == NULL) {
query_call_meter(cm);
return;
@@ -239,6 +249,7 @@ static void query_acm(struct ofono_call_meter *cm)
static void query_acm_max_callback(const struct ofono_error *error, int value,
void *data)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
struct ofono_call_meter *cm = data;
if (error->type == OFONO_ERROR_TYPE_NO_ERROR)
@@ -251,6 +262,7 @@ static void query_acm_max_callback(const struct ofono_error *error, int value,
static void query_acm_max(struct ofono_call_meter *cm)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
if (cm->driver->acm_max_query == NULL) {
cm->flags |= CALL_METER_FLAG_CACHED;
@@ -264,6 +276,7 @@ static void query_acm_max(struct ofono_call_meter *cm)
static void query_puct_callback(const struct ofono_error *error,
const char *currency, double ppu, void *data)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
struct ofono_call_meter *cm = data;
if (error->type == OFONO_ERROR_TYPE_NO_ERROR) {
@@ -277,6 +290,7 @@ static void query_puct_callback(const struct ofono_error *error,
static void query_puct(struct ofono_call_meter *cm)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
if (cm->driver->puct_query == NULL)
query_acm_max(cm);
else
@@ -286,6 +300,7 @@ static void query_puct(struct ofono_call_meter *cm)
static DBusMessage *cm_get_properties(DBusConnection *conn, DBusMessage *msg,
void *data)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
struct ofono_call_meter *cm = data;
if (cm->pending)
@@ -310,6 +325,7 @@ static DBusMessage *cm_get_properties(DBusConnection *conn, DBusMessage *msg,
static void set_acm_max_query_callback(const struct ofono_error *error,
int value, void *data)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
struct ofono_call_meter *cm = data;
DBusMessage *reply;
@@ -334,6 +350,7 @@ static void set_acm_max_query_callback(const struct ofono_error *error,
static void check_pin2_state(struct ofono_call_meter *cm)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
struct ofono_atom *sim_atom;
sim_atom = __ofono_modem_find_atom(__ofono_atom_get_modem(cm->atom),
@@ -346,6 +363,7 @@ static void check_pin2_state(struct ofono_call_meter *cm)
static void set_acm_max_callback(const struct ofono_error *error, void *data)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
struct ofono_call_meter *cm = data;
if (error->type != OFONO_ERROR_TYPE_NO_ERROR) {
@@ -365,6 +383,7 @@ static DBusMessage *prop_set_acm_max(DBusMessage *msg,
DBusMessageIter *dbus_value,
const char *pin2)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
dbus_uint32_t value;
if (cm->driver->acm_max_set == NULL)
@@ -383,6 +402,7 @@ static void set_puct_query_callback(const struct ofono_error *error,
const char *currency, double ppu,
void *data)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
struct ofono_call_meter *cm = data;
DBusMessage *reply;
@@ -408,6 +428,7 @@ static void set_puct_query_callback(const struct ofono_error *error,
static void set_puct_callback(const struct ofono_error *error, void *data)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
struct ofono_call_meter *cm = data;
if (error->type != OFONO_ERROR_TYPE_NO_ERROR) {
@@ -430,6 +451,7 @@ static void set_puct_initial_query_callback(const struct ofono_error *error,
const char *currency,
double ppu, void *data)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
struct ofono_call_meter *cm = data;
DBusMessageIter iter;
DBusMessageIter var;
@@ -469,6 +491,7 @@ static void set_puct_initial_query_callback(const struct ofono_error *error,
static DBusMessage *prop_set_ppu(DBusMessage *msg, struct ofono_call_meter *cm,
DBusMessageIter *var, const char *pin2)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
double ppu;
if (cm->driver->puct_set == NULL || cm->driver->puct_query == NULL)
@@ -493,6 +516,7 @@ static DBusMessage *prop_set_ppu(DBusMessage *msg, struct ofono_call_meter *cm,
static DBusMessage *prop_set_cur(DBusMessage *msg, struct ofono_call_meter *cm,
DBusMessageIter *var, const char *pin2)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
const char *value;
if (cm->driver->puct_set == NULL || cm->driver->puct_query == NULL)
@@ -531,6 +555,7 @@ static struct call_meter_property cm_properties[] = {
static DBusMessage *cm_set_property(DBusConnection *conn, DBusMessage *msg,
void *data)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
struct ofono_call_meter *cm = data;
DBusMessageIter iter;
DBusMessageIter var;
@@ -582,6 +607,7 @@ static DBusMessage *cm_set_property(DBusConnection *conn, DBusMessage *msg,
static void reset_acm_query_callback(const struct ofono_error *error, int value,
void *data)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
struct ofono_call_meter *cm = data;
DBusMessage *reply;
@@ -606,6 +632,7 @@ static void reset_acm_query_callback(const struct ofono_error *error, int value,
static void acm_reset_callback(const struct ofono_error *error, void *data)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
struct ofono_call_meter *cm = data;
if (error->type != OFONO_ERROR_TYPE_NO_ERROR) {
@@ -623,6 +650,7 @@ static void acm_reset_callback(const struct ofono_error *error, void *data)
static DBusMessage *cm_acm_reset(DBusConnection *conn, DBusMessage *msg,
void *data)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
struct ofono_call_meter *cm = data;
const char *pin2;
@@ -669,11 +697,13 @@ static const GDBusSignalTable cm_signals[] = {
void ofono_call_meter_changed_notify(struct ofono_call_meter *cm, int new_value)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
set_call_meter(cm, new_value);
}
void ofono_call_meter_maximum_notify(struct ofono_call_meter *cm)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
DBusConnection *conn = ofono_dbus_get_connection();
const char *path = __ofono_atom_get_path(cm->atom);
@@ -683,6 +713,7 @@ void ofono_call_meter_maximum_notify(struct ofono_call_meter *cm)
int ofono_call_meter_driver_register(const struct ofono_call_meter_driver *d)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
DBG("driver: %p, name: %s", d, d->name);
if (d->probe == NULL)
@@ -695,6 +726,7 @@ int ofono_call_meter_driver_register(const struct ofono_call_meter_driver *d)
void ofono_call_meter_driver_unregister(const struct ofono_call_meter_driver *d)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
DBG("driver: %p, name: %s", d, d->name);
g_drivers = g_slist_remove(g_drivers, (void *) d);
@@ -702,6 +734,7 @@ void ofono_call_meter_driver_unregister(const struct ofono_call_meter_driver *d)
static void call_meter_unregister(struct ofono_atom *atom)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
struct ofono_call_meter *cm = __ofono_atom_get_data(atom);
const char *path = __ofono_atom_get_path(cm->atom);
DBusConnection *conn = ofono_dbus_get_connection();
@@ -713,6 +746,7 @@ static void call_meter_unregister(struct ofono_atom *atom)
static void call_meter_remove(struct ofono_atom *atom)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
struct ofono_call_meter *cm = __ofono_atom_get_data(atom);
DBG("atom: %p", atom);
@@ -731,6 +765,7 @@ struct ofono_call_meter *ofono_call_meter_create(struct ofono_modem *modem,
const char *driver,
void *data)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
struct ofono_call_meter *cm;
GSList *l;
@@ -764,6 +799,7 @@ struct ofono_call_meter *ofono_call_meter_create(struct ofono_modem *modem,
void ofono_call_meter_register(struct ofono_call_meter *cm)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
DBusConnection *conn = ofono_dbus_get_connection();
const char *path = __ofono_atom_get_path(cm->atom);
struct ofono_modem *modem = __ofono_atom_get_modem(cm->atom);
@@ -784,15 +820,18 @@ void ofono_call_meter_register(struct ofono_call_meter *cm)
void ofono_call_meter_remove(struct ofono_call_meter *cm)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
__ofono_atom_free(cm->atom);
}
void ofono_call_meter_set_data(struct ofono_call_meter *cm, void *data)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
cm->driver_data = data;
}
void *ofono_call_meter_get_data(struct ofono_call_meter *cm)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
return cm->driver_data;
}

View File

@@ -116,6 +116,7 @@ struct ofono_call_settings {
static const char *clip_status_to_string(int status)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
switch (status) {
case CLIP_STATUS_NOT_PROVISIONED:
return "disabled";
@@ -128,6 +129,7 @@ static const char *clip_status_to_string(int status)
static const char *cdip_status_to_string(int status)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
switch (status) {
case CDIP_STATUS_NOT_PROVISIONED:
return "disabled";
@@ -140,6 +142,7 @@ static const char *cdip_status_to_string(int status)
static const char *cnap_status_to_string(int status)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
switch (status) {
case CNAP_STATUS_NOT_PROVISIONED:
return "disabled";
@@ -152,6 +155,7 @@ static const char *cnap_status_to_string(int status)
static const char *colp_status_to_string(int status)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
switch (status) {
case COLP_STATUS_NOT_PROVISIONED:
return "disabled";
@@ -164,6 +168,7 @@ static const char *colp_status_to_string(int status)
static const char *colr_status_to_string(int status)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
switch (status) {
case COLR_STATUS_NOT_PROVISIONED:
return "disabled";
@@ -176,6 +181,7 @@ static const char *colr_status_to_string(int status)
static const char *hide_callerid_to_string(int status)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
switch (status) {
case OFONO_CLIR_OPTION_DEFAULT:
return "default";
@@ -190,6 +196,7 @@ static const char *hide_callerid_to_string(int status)
static const char *clir_status_to_string(int status)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
switch (status) {
case CLIR_STATUS_NOT_PROVISIONED:
return "disabled";
@@ -206,6 +213,7 @@ static const char *clir_status_to_string(int status)
static void set_clir_network(struct ofono_call_settings *cs, int clir)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
DBusConnection *conn;
const char *path;
const char *str;
@@ -228,6 +236,7 @@ static void set_clir_network(struct ofono_call_settings *cs, int clir)
static void set_clir_override(struct ofono_call_settings *cs, int override)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
DBusConnection *conn;
const char *path;
const char *str;
@@ -250,6 +259,7 @@ static void set_clir_override(struct ofono_call_settings *cs, int override)
static void set_cdip(struct ofono_call_settings *cs, int cdip)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
DBusConnection *conn;
const char *path;
const char *str;
@@ -272,6 +282,7 @@ static void set_cdip(struct ofono_call_settings *cs, int cdip)
static void set_clip(struct ofono_call_settings *cs, int clip)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
DBusConnection *conn;
const char *path;
const char *str;
@@ -294,6 +305,7 @@ static void set_clip(struct ofono_call_settings *cs, int clip)
static void set_cnap(struct ofono_call_settings *cs, int cnap)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
DBusConnection *conn;
const char *path;
const char *str;
@@ -316,6 +328,7 @@ static void set_cnap(struct ofono_call_settings *cs, int cnap)
static void set_colp(struct ofono_call_settings *cs, int colp)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
DBusConnection *conn;
const char *path;
const char *str;
@@ -338,6 +351,7 @@ static void set_colp(struct ofono_call_settings *cs, int colp)
static void set_colr(struct ofono_call_settings *cs, int colr)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
DBusConnection *conn;
const char *path;
const char *str;
@@ -360,6 +374,7 @@ static void set_colr(struct ofono_call_settings *cs, int colr)
static void set_cw(struct ofono_call_settings *cs, int new_cw, int mask)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
DBusConnection *conn = ofono_dbus_get_connection();
const char *path = __ofono_atom_get_path(cs->atom);
char buf[64];
@@ -392,6 +407,7 @@ static void set_cw(struct ofono_call_settings *cs, int new_cw, int mask)
static void property_append_cw_conditions(DBusMessageIter *dict,
int conditions, int mask)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
int i;
char prop[128];
const char *value;
@@ -414,6 +430,7 @@ static void property_append_cw_conditions(DBusMessageIter *dict,
static void generate_cw_ss_query_reply(struct ofono_call_settings *cs)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
const char *sig = "(sa{sv})";
const char *ss_type = ss_control_type_to_string(cs->ss_req_type);
const char *context = "CallWaiting";
@@ -455,6 +472,7 @@ static void generate_cw_ss_query_reply(struct ofono_call_settings *cs)
static void cw_ss_query_callback(const struct ofono_error *error, int status,
void *data)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
struct ofono_call_settings *cs = data;
if (error->type != OFONO_ERROR_TYPE_NO_ERROR) {
@@ -474,6 +492,7 @@ static void cw_ss_query_callback(const struct ofono_error *error, int status,
static void cw_ss_set_callback(const struct ofono_error *error, void *data)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
struct ofono_call_settings *cs = data;
if (error->type != OFONO_ERROR_TYPE_NO_ERROR) {
@@ -494,6 +513,7 @@ static gboolean cw_ss_control(int type,
const char *sib, const char *sic,
const char *dn, DBusMessage *msg, void *data)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
struct ofono_call_settings *cs = data;
DBusConnection *conn = ofono_dbus_get_connection();
int cls = BEARER_CLASS_SS_DEFAULT;
@@ -577,6 +597,7 @@ error:
static void generate_ss_query_reply(struct ofono_call_settings *cs,
const char *context, const char *value)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
const char *sig = "(ss)";
const char *ss_type = ss_control_type_to_string(cs->ss_req_type);
DBusMessageIter iter;
@@ -610,6 +631,7 @@ static void generate_ss_query_reply(struct ofono_call_settings *cs,
static void clip_cnap_colp_colr_ss_query_cb(const struct ofono_error *error,
int status, void *data)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
struct ofono_call_settings *cs = data;
const char *context;
const char *value;
@@ -664,6 +686,7 @@ static gboolean clip_cnap_colp_colr_ss(int type,
const char *sib, const char *sic,
const char *dn, DBusMessage *msg, void *data)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
struct ofono_call_settings *cs = data;
DBusConnection *conn = ofono_dbus_get_connection();
void (*query_op)(struct ofono_call_settings *cs,
@@ -722,6 +745,7 @@ static gboolean clip_cnap_colp_colr_ss(int type,
static void clir_ss_query_callback(const struct ofono_error *error,
int override, int network, void *data)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
struct ofono_call_settings *cs = data;
const char *value;
@@ -772,6 +796,7 @@ static void clir_ss_query_callback(const struct ofono_error *error,
static void clir_ss_set_callback(const struct ofono_error *error, void *data)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
struct ofono_call_settings *cs = data;
if (error->type != OFONO_ERROR_TYPE_NO_ERROR) {
@@ -791,6 +816,7 @@ static gboolean clir_ss_control(int type,
const char *sib, const char *sic,
const char *dn, DBusMessage *msg, void *data)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
struct ofono_call_settings *cs = data;
DBusConnection *conn = ofono_dbus_get_connection();
@@ -862,6 +888,7 @@ static gboolean clir_ss_control(int type,
static void cs_register_ss_controls(struct ofono_call_settings *cs)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
__ofono_ussd_ssc_register(cs->ussd, "30", clip_cnap_colp_colr_ss,
cs, NULL);
__ofono_ussd_ssc_register(cs->ussd, "31", clir_ss_control, cs, NULL);
@@ -879,6 +906,7 @@ static void cs_register_ss_controls(struct ofono_call_settings *cs)
static void cs_unregister_ss_controls(struct ofono_call_settings *cs)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
__ofono_ussd_ssc_unregister(cs->ussd, "30");
__ofono_ussd_ssc_unregister(cs->ussd, "31");
__ofono_ussd_ssc_unregister(cs->ussd, "76");
@@ -892,12 +920,14 @@ static void cs_unregister_ss_controls(struct ofono_call_settings *cs)
gboolean __ofono_call_settings_is_busy(struct ofono_call_settings *cs)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
return cs->pending ? TRUE : FALSE;
}
static DBusMessage *generate_get_properties_reply(struct ofono_call_settings *cs,
DBusMessage *msg)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
DBusMessage *reply;
DBusMessageIter iter;
DBusMessageIter dict;
@@ -951,6 +981,7 @@ static void cs_clir_callback(const struct ofono_error *error,
int override_setting, int network_setting,
void *data)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
struct ofono_call_settings *cs = data;
if (error->type != OFONO_ERROR_TYPE_NO_ERROR)
@@ -971,6 +1002,7 @@ out:
static void query_clir(struct ofono_call_settings *cs)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
if (cs->driver->clir_query == NULL) {
if (cs->pending) {
DBusMessage *reply =
@@ -988,6 +1020,7 @@ static void query_clir(struct ofono_call_settings *cs)
static void cs_cdip_callback(const struct ofono_error *error,
int state, void *data)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
struct ofono_call_settings *cs = data;
if (error->type == OFONO_ERROR_TYPE_NO_ERROR)
@@ -998,6 +1031,7 @@ static void cs_cdip_callback(const struct ofono_error *error,
static void query_cdip(struct ofono_call_settings *cs)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
if (cs->driver->cdip_query == NULL) {
query_clir(cs);
return;
@@ -1010,6 +1044,7 @@ static void query_cdip(struct ofono_call_settings *cs)
static void cs_cnap_callback(const struct ofono_error *error,
int state, void *data)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
struct ofono_call_settings *cs = data;
if (error->type == OFONO_ERROR_TYPE_NO_ERROR)
@@ -1020,6 +1055,7 @@ static void cs_cnap_callback(const struct ofono_error *error,
static void query_cnap(struct ofono_call_settings *cs)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
if (cs->driver->cnap_query == NULL) {
query_cdip(cs);
return;
@@ -1031,6 +1067,7 @@ static void query_cnap(struct ofono_call_settings *cs)
static void cs_clip_callback(const struct ofono_error *error,
int state, void *data)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
struct ofono_call_settings *cs = data;
if (error->type == OFONO_ERROR_TYPE_NO_ERROR)
@@ -1041,6 +1078,7 @@ static void cs_clip_callback(const struct ofono_error *error,
static void query_clip(struct ofono_call_settings *cs)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
if (cs->driver->clip_query == NULL) {
query_clir(cs);
return;
@@ -1052,6 +1090,7 @@ static void query_clip(struct ofono_call_settings *cs)
static void cs_colp_callback(const struct ofono_error *error,
int state, void *data)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
struct ofono_call_settings *cs = data;
if (error->type == OFONO_ERROR_TYPE_NO_ERROR)
@@ -1062,6 +1101,7 @@ static void cs_colp_callback(const struct ofono_error *error,
static void query_colp(struct ofono_call_settings *cs)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
if (cs->driver->colp_query == NULL) {
query_clip(cs);
return;
@@ -1073,6 +1113,7 @@ static void query_colp(struct ofono_call_settings *cs)
static void cs_colr_callback(const struct ofono_error *error,
int state, void *data)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
struct ofono_call_settings *cs = data;
if (error->type == OFONO_ERROR_TYPE_NO_ERROR)
@@ -1083,6 +1124,7 @@ static void cs_colr_callback(const struct ofono_error *error,
static void query_colr(struct ofono_call_settings *cs)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
if (cs->driver->colr_query == NULL) {
query_colp(cs);
return;
@@ -1094,6 +1136,7 @@ static void query_colr(struct ofono_call_settings *cs)
static void cs_cw_callback(const struct ofono_error *error, int status,
void *data)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
struct ofono_call_settings *cs = data;
if (error->type == OFONO_ERROR_TYPE_NO_ERROR)
@@ -1104,6 +1147,7 @@ static void cs_cw_callback(const struct ofono_error *error, int status,
static void query_cw(struct ofono_call_settings *cs)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
if (cs->driver->cw_query == NULL) {
query_colr(cs);
return;
@@ -1115,6 +1159,7 @@ static void query_cw(struct ofono_call_settings *cs)
static DBusMessage *cs_get_properties(DBusConnection *conn, DBusMessage *msg,
void *data)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
struct ofono_call_settings *cs = data;
if (__ofono_call_settings_is_busy(cs) || __ofono_ussd_is_busy(cs->ussd))
@@ -1135,6 +1180,7 @@ static void clir_set_query_callback(const struct ofono_error *error,
int override_setting,
int network_setting, void *data)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
struct ofono_call_settings *cs = data;
DBusMessage *reply;
@@ -1160,6 +1206,7 @@ static void clir_set_query_callback(const struct ofono_error *error,
static void clir_set_callback(const struct ofono_error *error, void *data)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
struct ofono_call_settings *cs = data;
if (error->type != OFONO_ERROR_TYPE_NO_ERROR) {
@@ -1177,6 +1224,7 @@ static void clir_set_callback(const struct ofono_error *error, void *data)
static DBusMessage *set_clir(DBusMessage *msg, struct ofono_call_settings *cs,
const char *setting)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
int clir = -1;
if (cs->driver->clir_set == NULL)
@@ -1202,6 +1250,7 @@ static DBusMessage *set_clir(DBusMessage *msg, struct ofono_call_settings *cs,
static void cw_set_query_callback(const struct ofono_error *error, int status,
void *data)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
struct ofono_call_settings *cs = data;
if (error->type != OFONO_ERROR_TYPE_NO_ERROR) {
@@ -1222,6 +1271,7 @@ static void cw_set_query_callback(const struct ofono_error *error, int status,
static void cw_set_callback(const struct ofono_error *error, void *data)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
struct ofono_call_settings *cs = data;
if (error->type != OFONO_ERROR_TYPE_NO_ERROR) {
@@ -1240,6 +1290,7 @@ static void cw_set_callback(const struct ofono_error *error, void *data)
static DBusMessage *set_cw_req(DBusMessage *msg, struct ofono_call_settings *cs,
const char *setting, int cls)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
int cw;
if (cs->driver->cw_set == NULL)
@@ -1261,6 +1312,7 @@ static DBusMessage *set_cw_req(DBusMessage *msg, struct ofono_call_settings *cs,
static gboolean is_cw_property(const char *property, int mask, int *out_cls)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
int i;
int len;
const char *prefix;
@@ -1288,6 +1340,7 @@ static gboolean is_cw_property(const char *property, int mask, int *out_cls)
static DBusMessage *cs_set_property(DBusConnection *conn, DBusMessage *msg,
void *data)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
struct ofono_call_settings *cs = data;
DBusMessageIter iter;
DBusMessageIter var;
@@ -1352,6 +1405,7 @@ static const GDBusSignalTable cs_signals[] = {
int ofono_call_settings_driver_register(const struct ofono_call_settings_driver *d)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
DBG("driver: %p, name: %s", d, d->name);
if (d->probe == NULL)
@@ -1364,6 +1418,7 @@ int ofono_call_settings_driver_register(const struct ofono_call_settings_driver
void ofono_call_settings_driver_unregister(const struct ofono_call_settings_driver *d)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
DBG("driver: %p, name: %s", d, d->name);
g_drivers = g_slist_remove(g_drivers, (void *) d);
@@ -1371,6 +1426,7 @@ void ofono_call_settings_driver_unregister(const struct ofono_call_settings_driv
static void call_settings_unregister(struct ofono_atom *atom)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
struct ofono_call_settings *cs = __ofono_atom_get_data(atom);
const char *path = __ofono_atom_get_path(cs->atom);
DBusConnection *conn = ofono_dbus_get_connection();
@@ -1388,6 +1444,7 @@ static void call_settings_unregister(struct ofono_atom *atom)
static void call_settings_remove(struct ofono_atom *atom)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
struct ofono_call_settings *cs = __ofono_atom_get_data(atom);
DBG("atom: %p", atom);
@@ -1406,6 +1463,7 @@ struct ofono_call_settings *ofono_call_settings_create(struct ofono_modem *modem
const char *driver,
void *data)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
struct ofono_call_settings *cs;
GSList *l;
@@ -1445,6 +1503,7 @@ struct ofono_call_settings *ofono_call_settings_create(struct ofono_modem *modem
static void ussd_watch(struct ofono_atom *atom,
enum ofono_atom_watch_condition cond, void *data)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
struct ofono_call_settings *cs = data;
if (cond == OFONO_ATOM_WATCH_CONDITION_UNREGISTERED) {
@@ -1458,6 +1517,7 @@ static void ussd_watch(struct ofono_atom *atom,
void ofono_call_settings_register(struct ofono_call_settings *cs)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
DBusConnection *conn = ofono_dbus_get_connection();
const char *path = __ofono_atom_get_path(cs->atom);
struct ofono_modem *modem = __ofono_atom_get_modem(cs->atom);
@@ -1483,15 +1543,18 @@ void ofono_call_settings_register(struct ofono_call_settings *cs)
void ofono_call_settings_remove(struct ofono_call_settings *cs)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
__ofono_atom_free(cs->atom);
}
void ofono_call_settings_set_data(struct ofono_call_settings *cs, void *data)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
cs->driver_data = data;
}
void *ofono_call_settings_get_data(struct ofono_call_settings *cs)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
return cs->driver_data;
}

View File

@@ -56,6 +56,7 @@ struct ofono_call_volume {
void ofono_call_volume_set_speaker_volume(struct ofono_call_volume *cv,
unsigned char percent)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
DBusConnection *conn = ofono_dbus_get_connection();
const char *path = __ofono_atom_get_path(cv->atom);
@@ -73,6 +74,7 @@ void ofono_call_volume_set_speaker_volume(struct ofono_call_volume *cv,
void ofono_call_volume_set_microphone_volume(struct ofono_call_volume *cv,
unsigned char percent)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
DBusConnection *conn = ofono_dbus_get_connection();
const char *path = __ofono_atom_get_path(cv->atom);
@@ -89,6 +91,7 @@ void ofono_call_volume_set_microphone_volume(struct ofono_call_volume *cv,
void ofono_call_volume_set_muted(struct ofono_call_volume *cv, int muted)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
DBusConnection *conn = ofono_dbus_get_connection();
const char *path = __ofono_atom_get_path(cv->atom);
dbus_bool_t m;
@@ -107,6 +110,7 @@ void ofono_call_volume_set_muted(struct ofono_call_volume *cv, int muted)
static DBusMessage *cv_get_properties(DBusConnection *conn,
DBusMessage *msg, void *data)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
struct ofono_call_volume *cv = data;
DBusMessage *reply;
DBusMessageIter iter, dict;
@@ -138,6 +142,7 @@ static DBusMessage *cv_get_properties(DBusConnection *conn,
static void sv_set_callback(const struct ofono_error *error, void *data)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
struct ofono_call_volume *cv = data;
DBusConnection *conn = ofono_dbus_get_connection();
const char *path = __ofono_atom_get_path(cv->atom);
@@ -161,6 +166,7 @@ static void sv_set_callback(const struct ofono_error *error, void *data)
static void mv_set_callback(const struct ofono_error *error, void *data)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
struct ofono_call_volume *cv = data;
DBusConnection *conn = ofono_dbus_get_connection();
const char *path = __ofono_atom_get_path(cv->atom);
@@ -184,6 +190,7 @@ static void mv_set_callback(const struct ofono_error *error, void *data)
static void muted_set_callback(const struct ofono_error *error, void *data)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
struct ofono_call_volume *cv = data;
DBusConnection *conn = ofono_dbus_get_connection();
const char *path = __ofono_atom_get_path(cv->atom);
@@ -210,6 +217,7 @@ static void muted_set_callback(const struct ofono_error *error, void *data)
static DBusMessage *cv_set_property(DBusConnection *conn, DBusMessage *msg,
void *data)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
struct ofono_call_volume *cv = data;
DBusMessageIter iter;
DBusMessageIter var;
@@ -318,6 +326,7 @@ static const GDBusSignalTable cv_signals[] = {
static void call_volume_remove(struct ofono_atom *atom)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
struct ofono_call_volume *cv = __ofono_atom_get_data(atom);
DBG("atom: %p", atom);
@@ -336,6 +345,7 @@ struct ofono_call_volume *ofono_call_volume_create(struct ofono_modem *modem,
const char *driver,
void *data)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
struct ofono_call_volume *cv;
GSList *l;
@@ -368,6 +378,7 @@ struct ofono_call_volume *ofono_call_volume_create(struct ofono_modem *modem,
static void call_volume_unregister(struct ofono_atom *atom)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
DBusConnection *conn = ofono_dbus_get_connection();
struct ofono_modem *modem = __ofono_atom_get_modem(atom);
const char *path = __ofono_atom_get_path(atom);
@@ -379,6 +390,7 @@ static void call_volume_unregister(struct ofono_atom *atom)
void ofono_call_volume_register(struct ofono_call_volume *cv)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
DBusConnection *conn = ofono_dbus_get_connection();
struct ofono_modem *modem = __ofono_atom_get_modem(cv->atom);
const char *path = __ofono_atom_get_path(cv->atom);
@@ -400,6 +412,7 @@ void ofono_call_volume_register(struct ofono_call_volume *cv)
int ofono_call_volume_driver_register(const struct ofono_call_volume_driver *d)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
DBG("driver: %p, name: %s", d, d->name);
if (d->probe == NULL)
@@ -413,6 +426,7 @@ int ofono_call_volume_driver_register(const struct ofono_call_volume_driver *d)
void ofono_call_volume_driver_unregister(
const struct ofono_call_volume_driver *d)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
DBG("driver: %p, name: %s", d, d->name);
g_drivers = g_slist_remove(g_drivers, (void *) d);
@@ -420,15 +434,18 @@ void ofono_call_volume_driver_unregister(
void ofono_call_volume_remove(struct ofono_call_volume *cv)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
__ofono_atom_free(cv->atom);
}
void ofono_call_volume_set_data(struct ofono_call_volume *cv, void *data)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
cv->driver_data = data;
}
void *ofono_call_volume_get_data(struct ofono_call_volume *cv)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
return cv->driver_data;
}

View File

@@ -84,6 +84,7 @@ struct ofono_cbs {
static void cbs_dispatch_base_station_id(struct ofono_cbs *cbs, const char *id)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
DBG("Base station id: %s", id);
if (cbs->netreg == NULL)
@@ -101,6 +102,7 @@ static void cbs_dispatch_emergency(struct ofono_cbs *cbs, const char *message,
enum etws_topic_type topic,
gboolean alert, gboolean popup)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
DBusConnection *conn = ofono_dbus_get_connection();
const char *path = __ofono_atom_get_path(cbs->atom);
DBusMessage *signal;
@@ -161,6 +163,7 @@ static void cbs_dispatch_emergency(struct ofono_cbs *cbs, const char *message,
static void cbs_dispatch_text(struct ofono_cbs *cbs, enum sms_class cls,
unsigned short channel, const char *message)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
DBusConnection *conn = ofono_dbus_get_connection();
const char *path = __ofono_atom_get_path(cbs->atom);
@@ -174,6 +177,7 @@ static void cbs_dispatch_text(struct ofono_cbs *cbs, enum sms_class cls,
void ofono_cbs_notify(struct ofono_cbs *cbs, const unsigned char *pdu,
int pdu_len)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
struct cbs c;
enum sms_class cls;
gboolean udhi;
@@ -278,6 +282,7 @@ out:
static DBusMessage *cbs_get_properties(DBusConnection *conn,
DBusMessage *msg, void *data)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
struct ofono_cbs *cbs = data;
DBusMessage *reply;
DBusMessageIter iter, dict;
@@ -307,6 +312,7 @@ static DBusMessage *cbs_get_properties(DBusConnection *conn,
static char *cbs_topics_to_str(struct ofono_cbs *cbs, GSList *user_topics)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
GSList *topics = NULL;
char *topic_str;
struct cbs_topic_range etws_range = { 4352, 4356 };
@@ -329,6 +335,7 @@ static char *cbs_topics_to_str(struct ofono_cbs *cbs, GSList *user_topics)
static void cbs_set_topics_cb(const struct ofono_error *error, void *data)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
struct ofono_cbs *cbs = data;
const char *path = __ofono_atom_get_path(cbs->atom);
DBusConnection *conn = ofono_dbus_get_connection();
@@ -369,6 +376,7 @@ static void cbs_set_topics_cb(const struct ofono_error *error, void *data)
static DBusMessage *cbs_set_topics(struct ofono_cbs *cbs, const char *value,
DBusMessage *msg)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
GSList *topics;
char *topic_str;
struct ofono_error error;
@@ -400,6 +408,7 @@ static DBusMessage *cbs_set_topics(struct ofono_cbs *cbs, const char *value,
static void cbs_set_powered_cb(const struct ofono_error *error, void *data)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
struct ofono_cbs *cbs = data;
const char *path = __ofono_atom_get_path(cbs->atom);
DBusConnection *conn = ofono_dbus_get_connection();
@@ -440,6 +449,7 @@ static void cbs_set_powered_cb(const struct ofono_error *error, void *data)
static DBusMessage *cbs_set_powered(struct ofono_cbs *cbs, gboolean value,
DBusMessage *msg)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
const char *path = __ofono_atom_get_path(cbs->atom);
DBusConnection *conn = ofono_dbus_get_connection();
char *topic_str;
@@ -490,6 +500,7 @@ reply:
static DBusMessage *cbs_set_property(DBusConnection *conn, DBusMessage *msg,
void *data)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
struct ofono_cbs *cbs = data;
DBusMessageIter iter;
DBusMessageIter var;
@@ -559,6 +570,7 @@ static const GDBusSignalTable cbs_signals[] = {
int ofono_cbs_driver_register(const struct ofono_cbs_driver *d)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
DBG("driver: %p, name: %s", d, d->name);
if (d->probe == NULL)
@@ -571,6 +583,7 @@ int ofono_cbs_driver_register(const struct ofono_cbs_driver *d)
void ofono_cbs_driver_unregister(const struct ofono_cbs_driver *d)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
DBG("driver: %p, name: %s", d, d->name);
g_drivers = g_slist_remove(g_drivers, (void *) d);
@@ -578,6 +591,7 @@ void ofono_cbs_driver_unregister(const struct ofono_cbs_driver *d)
static void cbs_unregister(struct ofono_atom *atom)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
struct ofono_cbs *cbs = __ofono_atom_get_data(atom);
DBusConnection *conn = ofono_dbus_get_connection();
struct ofono_modem *modem = __ofono_atom_get_modem(atom);
@@ -643,6 +657,7 @@ static void cbs_unregister(struct ofono_atom *atom)
static void cbs_remove(struct ofono_atom *atom)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
struct ofono_cbs *cbs = __ofono_atom_get_data(atom);
DBG("atom: %p", atom);
@@ -664,6 +679,7 @@ struct ofono_cbs *ofono_cbs_create(struct ofono_modem *modem,
const char *driver,
void *data)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
struct ofono_cbs *cbs;
GSList *l;
@@ -697,6 +713,7 @@ struct ofono_cbs *ofono_cbs_create(struct ofono_modem *modem,
static void cbs_got_file_contents(struct ofono_cbs *cbs)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
gboolean powered;
GSList *initial_topics = NULL;
char *topics_str;
@@ -750,6 +767,7 @@ static void sim_cbmi_read_cb(int ok, int length, int record,
const unsigned char *data,
int record_length, void *userdata)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
struct ofono_cbs *cbs = userdata;
unsigned short mi;
int i;
@@ -794,6 +812,7 @@ static void sim_cbmir_read_cb(int ok, int length, int record,
const unsigned char *data,
int record_length, void *userdata)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
struct ofono_cbs *cbs = userdata;
int i;
unsigned short min;
@@ -841,6 +860,7 @@ static void sim_cbmid_read_cb(int ok, int length, int record,
const unsigned char *data,
int record_length, void *userdata)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
struct ofono_cbs *cbs = userdata;
unsigned short mi;
int i;
@@ -895,6 +915,7 @@ done:
static void cbs_efcbmid_changed(int id, void *userdata)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
struct ofono_cbs *cbs = userdata;
if (cbs->efcbmid_length) {
@@ -912,6 +933,7 @@ static void cbs_efcbmid_changed(int id, void *userdata)
static void cbs_got_imsi(struct ofono_cbs *cbs)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
const char *imsi = ofono_sim_get_imsi(cbs->sim);
char *topics_str;
@@ -956,6 +978,7 @@ static void cbs_got_imsi(struct ofono_cbs *cbs)
static gboolean reset_base_station_name(gpointer user)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
struct ofono_cbs *cbs = user;
cbs->reset_source = 0;
@@ -973,6 +996,7 @@ static void cbs_location_changed(int status, int lac, int ci, int tech,
const char *mcc, const char *mnc,
void *data)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
struct ofono_cbs *cbs = data;
gboolean plmn_changed = FALSE;
gboolean lac_changed = FALSE;
@@ -1040,6 +1064,7 @@ static void netreg_watch(struct ofono_atom *atom,
enum ofono_atom_watch_condition cond,
void *data)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
struct ofono_cbs *cbs = data;
const char *mcc;
const char *mnc;
@@ -1077,6 +1102,7 @@ static void netreg_watch(struct ofono_atom *atom,
void ofono_cbs_register(struct ofono_cbs *cbs)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
DBusConnection *conn = ofono_dbus_get_connection();
struct ofono_modem *modem = __ofono_atom_get_modem(cbs->atom);
const char *path = __ofono_atom_get_path(cbs->atom);
@@ -1111,15 +1137,18 @@ void ofono_cbs_register(struct ofono_cbs *cbs)
void ofono_cbs_remove(struct ofono_cbs *cbs)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
__ofono_atom_free(cbs->atom);
}
void ofono_cbs_set_data(struct ofono_cbs *cbs, void *data)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
cbs->driver_data = data;
}
void *ofono_cbs_get_data(struct ofono_cbs *cbs)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
return cbs->driver_data;
}

View File

@@ -63,6 +63,7 @@ struct ofono_cdma_connman {
static void cdma_connman_settings_free(struct cdma_connman_settings *settings)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
DBG("");
g_free(settings->interface);
@@ -76,6 +77,7 @@ static void cdma_connman_settings_free(struct cdma_connman_settings *settings)
static void cdma_connman_ifupdown(const char *interface, ofono_bool_t active)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
struct ifreq ifr;
int sk;
@@ -115,6 +117,7 @@ static void cdma_connman_settings_append_variant(
struct cdma_connman_settings *settings,
DBusMessageIter *iter)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
DBusMessageIter variant;
DBusMessageIter array;
char typesig[5];
@@ -174,6 +177,7 @@ done:
static void cdma_connman_settings_signal(struct ofono_cdma_connman *cm)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
DBusConnection *conn = ofono_dbus_get_connection();
const char *path;
DBusMessage *signal;
@@ -205,6 +209,7 @@ static void cdma_connman_settings_update(struct ofono_cdma_connman *cm,
const char *ip, const char *netmask,
const char *gateway, const char **dns)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
DBG("");
if (cm->settings)
@@ -228,6 +233,7 @@ static void cdma_connman_settings_update(struct ofono_cdma_connman *cm,
static void cdma_connman_settings_reset(struct ofono_cdma_connman *cm)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
char *interface;
DBG("");
@@ -255,6 +261,7 @@ static void activate_callback(const struct ofono_error *error,
const char *gateway, const char **dns,
void *data)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
DBusConnection *conn = ofono_dbus_get_connection();
struct ofono_cdma_connman *cm = data;
dbus_bool_t value;
@@ -291,6 +298,7 @@ static void activate_callback(const struct ofono_error *error,
static void deactivate_callback(const struct ofono_error *error, void *data)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
DBusConnection *conn = ofono_dbus_get_connection();
struct ofono_cdma_connman *cm = data;
dbus_bool_t value;
@@ -323,6 +331,7 @@ static void cdma_connman_settings_append_properties(
struct ofono_cdma_connman *cm,
DBusMessageIter *dict)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
DBusMessageIter entry;
const char *key = "Settings";
@@ -340,6 +349,7 @@ static void cdma_connman_settings_append_properties(
static ofono_bool_t network_registered(struct ofono_cdma_connman *cm)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
int status;
struct ofono_modem *modem = __ofono_atom_get_modem(cm->atom);
struct ofono_cdma_netreg *cdma_netreg;
@@ -364,6 +374,7 @@ static ofono_bool_t network_registered(struct ofono_cdma_connman *cm)
static DBusMessage *cdma_connman_get_properties(DBusConnection *conn,
DBusMessage *msg, void *data)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
struct ofono_cdma_connman *cm = data;
DBusMessage *reply;
DBusMessageIter iter;
@@ -400,6 +411,7 @@ static DBusMessage *cdma_connman_set_username(struct ofono_cdma_connman *cm,
DBusConnection *conn, DBusMessage *msg,
const char *username)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
const char *path;
if (strlen(username) > OFONO_CDMA_CONNMAN_MAX_USERNAME_LENGTH)
@@ -424,6 +436,7 @@ static DBusMessage *cdma_connman_set_password(struct ofono_cdma_connman *cm,
DBusConnection *conn, DBusMessage *msg,
const char *password)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
const char *path;
if (strlen(password) > OFONO_CDMA_CONNMAN_MAX_PASSWORD_LENGTH)
@@ -447,6 +460,7 @@ static DBusMessage *cdma_connman_set_password(struct ofono_cdma_connman *cm,
static DBusMessage *cdma_connman_set_property(DBusConnection *conn,
DBusMessage *msg, void *data)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
struct ofono_cdma_connman *cm = data;
DBusMessageIter iter;
DBusMessageIter var;
@@ -536,6 +550,7 @@ static const GDBusSignalTable cdma_connman_signals[] = {
int ofono_cdma_connman_driver_register(
const struct ofono_cdma_connman_driver *d)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
DBG("driver: %p, name: %s", d, d->name);
if (d->probe == NULL)
@@ -549,6 +564,7 @@ int ofono_cdma_connman_driver_register(
void ofono_cdma_connman_driver_unregister(
const struct ofono_cdma_connman_driver *d)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
DBG("driver: %p, name: %s", d, d->name);
g_drivers = g_slist_remove(g_drivers, (void *) d);
@@ -556,6 +572,7 @@ void ofono_cdma_connman_driver_unregister(
void ofono_cdma_connman_deactivated(struct ofono_cdma_connman *cm)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
DBusConnection *conn = ofono_dbus_get_connection();
ofono_bool_t value;
const char *path;
@@ -576,6 +593,7 @@ void ofono_cdma_connman_deactivated(struct ofono_cdma_connman *cm)
void ofono_cdma_connman_dormant_notify(struct ofono_cdma_connman *cm,
ofono_bool_t dormant)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
DBusConnection *conn = ofono_dbus_get_connection();
const char *path;
@@ -592,6 +610,7 @@ void ofono_cdma_connman_dormant_notify(struct ofono_cdma_connman *cm,
static void cdma_connman_unregister(struct ofono_atom *atom)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
DBusConnection *conn = ofono_dbus_get_connection();
struct ofono_modem *modem = __ofono_atom_get_modem(atom);
const char *path = __ofono_atom_get_path(atom);
@@ -606,6 +625,7 @@ static void cdma_connman_unregister(struct ofono_atom *atom)
static void cdma_connman_remove(struct ofono_atom *atom)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
struct ofono_cdma_connman *cm = __ofono_atom_get_data(atom);
DBG("atom: %p", atom);
@@ -625,6 +645,7 @@ struct ofono_cdma_connman *ofono_cdma_connman_create(
const char *driver,
void *data)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
struct ofono_cdma_connman *cm;
GSList *l;
@@ -659,6 +680,7 @@ struct ofono_cdma_connman *ofono_cdma_connman_create(
void ofono_cdma_connman_register(struct ofono_cdma_connman *cm)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
DBusConnection *conn = ofono_dbus_get_connection();
struct ofono_modem *modem = __ofono_atom_get_modem(cm->atom);
const char *path = __ofono_atom_get_path(cm->atom);
@@ -682,15 +704,18 @@ void ofono_cdma_connman_register(struct ofono_cdma_connman *cm)
void ofono_cdma_connman_remove(struct ofono_cdma_connman *cm)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
__ofono_atom_free(cm->atom);
}
void ofono_cdma_connman_set_data(struct ofono_cdma_connman *cm, void *data)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
cm->driver_data = data;
}
void *ofono_cdma_connman_get_data(struct ofono_cdma_connman *cm)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
return cm->driver_data;
}

View File

@@ -45,6 +45,7 @@ struct ofono_cdma_netreg {
static const char *cdma_netreg_status_to_string(enum cdma_netreg_status status)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
switch (status) {
case CDMA_NETWORK_REGISTRATION_STATUS_NOT_REGISTERED:
return "unregistered";
@@ -60,6 +61,7 @@ static const char *cdma_netreg_status_to_string(enum cdma_netreg_status status)
static DBusMessage *network_get_properties(DBusConnection *conn,
DBusMessage *msg, void *data)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
struct ofono_cdma_netreg *cdma_netreg = data;
DBusMessage *reply;
DBusMessageIter iter;
@@ -123,6 +125,7 @@ static const GDBusSignalTable cdma_netreg_manager_signals[] = {
static void serving_system_callback(const struct ofono_error *error,
const char *sid, void *data)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
struct ofono_cdma_netreg *cdma_netreg = data;
const char *path = __ofono_atom_get_path(cdma_netreg->atom);
DBusConnection *conn = ofono_dbus_get_connection();
@@ -167,6 +170,7 @@ static void serving_system_callback(const struct ofono_error *error,
static void set_registration_status(struct ofono_cdma_netreg *cdma_netreg,
enum cdma_netreg_status status)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
const char *str_status = cdma_netreg_status_to_string(status);
const char *path = __ofono_atom_get_path(cdma_netreg->atom);
DBusConnection *conn = ofono_dbus_get_connection();
@@ -189,6 +193,7 @@ static void set_registration_status(struct ofono_cdma_netreg *cdma_netreg,
void ofono_cdma_netreg_status_notify(struct ofono_cdma_netreg *cdma_netreg,
enum cdma_netreg_status status)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
if (cdma_netreg == NULL)
return;
@@ -200,6 +205,7 @@ static void strength_notify_common(struct ofono_cdma_netreg *netreg,
int strength, const char *property,
int *dest)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
if (netreg == NULL)
return;
@@ -229,6 +235,7 @@ static void strength_notify_common(struct ofono_cdma_netreg *netreg,
void ofono_cdma_netreg_strength_notify(struct ofono_cdma_netreg *netreg,
int strength)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
return strength_notify_common(netreg, strength,
"Strength", &netreg->strength);
}
@@ -236,12 +243,14 @@ void ofono_cdma_netreg_strength_notify(struct ofono_cdma_netreg *netreg,
void ofono_cdma_netreg_data_strength_notify(struct ofono_cdma_netreg *netreg,
int data_strength)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
return strength_notify_common(netreg, data_strength,
"DataStrength", &netreg->hdr_strength);
}
int ofono_cdma_netreg_get_status(struct ofono_cdma_netreg *netreg)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
if (netreg == NULL)
return -1;
@@ -250,6 +259,7 @@ int ofono_cdma_netreg_get_status(struct ofono_cdma_netreg *netreg)
int ofono_cdma_netreg_driver_register(const struct ofono_cdma_netreg_driver *d)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
DBG("driver: %p, name: %s", d, d->name);
if (d->probe == NULL)
@@ -263,6 +273,7 @@ int ofono_cdma_netreg_driver_register(const struct ofono_cdma_netreg_driver *d)
void ofono_cdma_netreg_driver_unregister(
const struct ofono_cdma_netreg_driver *d)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
DBG("driver: %p, name: %s", d, d->name);
g_drivers = g_slist_remove(g_drivers, (void *)d);
@@ -270,6 +281,7 @@ void ofono_cdma_netreg_driver_unregister(
static void cdma_netreg_unregister(struct ofono_atom *atom)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
DBusConnection *conn = ofono_dbus_get_connection();
struct ofono_modem *modem = __ofono_atom_get_modem(atom);
const char *path = __ofono_atom_get_path(atom);
@@ -283,6 +295,7 @@ static void cdma_netreg_unregister(struct ofono_atom *atom)
static void cdma_netreg_remove(struct ofono_atom *atom)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
struct ofono_cdma_netreg *cdma_netreg = __ofono_atom_get_data(atom);
DBG("atom: %p", atom);
@@ -303,6 +316,7 @@ struct ofono_cdma_netreg *ofono_cdma_netreg_create(struct ofono_modem *modem,
const char *driver,
void *data)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
struct ofono_cdma_netreg *cdma_netreg;
GSList *l;
@@ -339,6 +353,7 @@ struct ofono_cdma_netreg *ofono_cdma_netreg_create(struct ofono_modem *modem,
void ofono_cdma_netreg_register(struct ofono_cdma_netreg *cdma_netreg)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
DBusConnection *conn = ofono_dbus_get_connection();
struct ofono_modem *modem = __ofono_atom_get_modem(cdma_netreg->atom);
const char *path = __ofono_atom_get_path(cdma_netreg->atom);
@@ -361,16 +376,19 @@ void ofono_cdma_netreg_register(struct ofono_cdma_netreg *cdma_netreg)
void ofono_cdma_netreg_remove(struct ofono_cdma_netreg *cdma_netreg)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
__ofono_atom_free(cdma_netreg->atom);
}
void ofono_cdma_netreg_set_data(struct ofono_cdma_netreg *cdma_netreg,
void *data)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
cdma_netreg->driver_data = data;
}
void *ofono_cdma_netreg_get_data(struct ofono_cdma_netreg *cdma_netreg)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
return cdma_netreg->driver_data;
}

View File

@@ -31,6 +31,7 @@ static GSList *g_drivers = NULL;
ofono_bool_t __ofono_cdma_provision_get_name(const char *sid, char **name)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
GSList *d;
if (sid == NULL || strlen(sid) == 0)
@@ -55,6 +56,7 @@ ofono_bool_t __ofono_cdma_provision_get_name(const char *sid, char **name)
static gint compare_priority(gconstpointer a, gconstpointer b)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
const struct ofono_cdma_provision_driver *plugin1 = a;
const struct ofono_cdma_provision_driver *plugin2 = b;
@@ -64,6 +66,7 @@ static gint compare_priority(gconstpointer a, gconstpointer b)
int ofono_cdma_provision_driver_register(
const struct ofono_cdma_provision_driver *driver)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
DBG("driver: %p name: %s", driver, driver->name);
g_drivers = g_slist_insert_sorted(g_drivers, (void *) driver,
@@ -74,6 +77,7 @@ int ofono_cdma_provision_driver_register(
void ofono_cdma_provision_driver_unregister(
const struct ofono_cdma_provision_driver *driver)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
DBG("driver: %p name: %s", driver, driver->name);
g_drivers = g_slist_remove(g_drivers, driver);

View File

@@ -59,6 +59,7 @@ static void cdma_dispatch_text_message(struct ofono_cdma_sms *cdma_sms,
const char *message,
const char *oaddr)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
const char *path = __ofono_atom_get_path(cdma_sms->atom);
DBusConnection *conn = ofono_dbus_get_connection();
DBusMessage *signal;
@@ -97,6 +98,7 @@ static void cdma_dispatch_text_message(struct ofono_cdma_sms *cdma_sms,
static void ofono_cdma_sms_process_wmt_deliver(struct ofono_cdma_sms *cdma_sms,
const struct cdma_sms *incoming)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
char *message;
const char *oaddr;
const struct cdma_sms_ud *ud;
@@ -130,6 +132,7 @@ static void ofono_cdma_sms_process_wmt_deliver(struct ofono_cdma_sms *cdma_sms,
static void ofono_cdma_sms_process_wmt(struct ofono_cdma_sms *cdma_sms,
struct cdma_sms *incoming)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
/* TODO: Add duplicate detection support */
switch (incoming->p2p_msg.bd.id.msg_type) {
@@ -153,6 +156,7 @@ static void ofono_cdma_sms_process_wmt(struct ofono_cdma_sms *cdma_sms,
static void ofono_cdma_sms_process_p2p(struct ofono_cdma_sms *cdma_sms,
struct cdma_sms *incoming)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
switch (incoming->p2p_msg.teleservice_id) {
case CDMA_SMS_TELESERVICE_ID_CMT91:
case CDMA_SMS_TELESERVICE_ID_WPT:
@@ -172,6 +176,7 @@ static void ofono_cdma_sms_process_p2p(struct ofono_cdma_sms *cdma_sms,
void ofono_cdma_sms_deliver_notify(struct ofono_cdma_sms *cdma_sms,
const unsigned char *pdu, int tpdu_len)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
static struct cdma_sms s;
DBG("tpdu len %d", tpdu_len);
@@ -197,6 +202,7 @@ void ofono_cdma_sms_deliver_notify(struct ofono_cdma_sms *cdma_sms,
int ofono_cdma_sms_driver_register(const struct ofono_cdma_sms_driver *d)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
DBG("driver: %p, name: %s", d, d->name);
if (d->probe == NULL)
@@ -209,6 +215,7 @@ int ofono_cdma_sms_driver_register(const struct ofono_cdma_sms_driver *d)
void ofono_cdma_sms_driver_unregister(const struct ofono_cdma_sms_driver *d)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
DBG("driver: %p, name: %s", d, d->name);
g_drivers = g_slist_remove(g_drivers, (void *)d);
@@ -216,6 +223,7 @@ void ofono_cdma_sms_driver_unregister(const struct ofono_cdma_sms_driver *d)
static void cdma_sms_unregister(struct ofono_atom *atom)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
DBusConnection *conn = ofono_dbus_get_connection();
struct ofono_modem *modem = __ofono_atom_get_modem(atom);
const char *path = __ofono_atom_get_path(atom);
@@ -229,6 +237,7 @@ static void cdma_sms_unregister(struct ofono_atom *atom)
static void cdma_sms_remove(struct ofono_atom *atom)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
struct ofono_cdma_sms *cdma_sms = __ofono_atom_get_data(atom);
DBG("atom: %p", atom);
@@ -257,6 +266,7 @@ struct ofono_cdma_sms *ofono_cdma_sms_create(struct ofono_modem *modem,
const char *driver,
void *data)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
struct ofono_cdma_sms *cdma_sms;
GSList *l;
@@ -296,6 +306,7 @@ struct ofono_cdma_sms *ofono_cdma_sms_create(struct ofono_modem *modem,
*/
void ofono_cdma_sms_register(struct ofono_cdma_sms *cdma_sms)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
DBusConnection *conn = ofono_dbus_get_connection();
struct ofono_modem *modem = __ofono_atom_get_modem(cdma_sms->atom);
const char *path = __ofono_atom_get_path(cdma_sms->atom);
@@ -317,15 +328,18 @@ void ofono_cdma_sms_register(struct ofono_cdma_sms *cdma_sms)
void ofono_cdma_sms_remove(struct ofono_cdma_sms *cdma_sms)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
__ofono_atom_free(cdma_sms->atom);
}
void ofono_cdma_sms_set_data(struct ofono_cdma_sms *cdma_sms, void *data)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
cdma_sms->driver_data = data;
}
void *ofono_cdma_sms_get_data(struct ofono_cdma_sms *cdma_sms)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
return cdma_sms->driver_data;
}

View File

@@ -53,6 +53,7 @@ struct simple_iter {
static void simple_iter_init(struct simple_iter *iter,
const guint8 *pdu, guint8 len)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
iter->pdu = pdu;
iter->max = len;
iter->pos = 0;
@@ -63,6 +64,7 @@ static void simple_iter_init(struct simple_iter *iter,
static gboolean simple_iter_next(struct simple_iter *iter)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
const guint8 *pdu = iter->pdu + iter->pos;
const guint8 *end = iter->pdu + iter->max;
guint8 id;
@@ -93,27 +95,32 @@ static gboolean simple_iter_next(struct simple_iter *iter)
static guint8 simple_iter_get_id(struct simple_iter *iter)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
return iter->id;
}
static guint8 simple_iter_get_length(struct simple_iter *iter)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
return iter->len;
}
static const guint8 *simple_iter_get_data(struct simple_iter *iter)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
return iter->data;
}
static inline void set_bitmap(guint32 *bitmap, guint8 pos)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
*bitmap = *bitmap | (1 << pos);
}
/* Unpacks the byte stream. The field has to be <= 8 bits. */
static guint8 bit_field_unpack(const guint8 *buf, guint16 offset, guint8 nbit)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
guint8 bit_pos;
guint8 val = 0;
const guint8 *pdu;
@@ -137,6 +144,7 @@ static guint8 bit_field_unpack(const guint8 *buf, guint16 offset, guint8 nbit)
static gboolean dtmf_to_ascii(char *buf, const guint8 *addr,
guint8 num_fields)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
/*
* Mapping from binary DTMF code to the digit it represents.
* As defined in Table 2.7.1.3.2.4-4 of 3GPP2 C.S0005-E v2.0.
@@ -163,6 +171,7 @@ static gboolean dtmf_to_ascii(char *buf, const guint8 *addr,
const char *cdma_sms_address_to_string(const struct cdma_sms_address *addr)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
static char buf[CDMA_SMS_MAX_ADDR_FIELDS + 1];
/* TODO: Only support CDMA_SMS_DIGIT_MODE_4BIT_DTMF currently */
@@ -184,6 +193,7 @@ const char *cdma_sms_address_to_string(const struct cdma_sms_address *addr)
static gboolean cdma_sms_decode_teleservice(const guint8 *buf, guint8 len,
void *data)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
enum cdma_sms_teleservice_id *id = data;
*id = bit_field_unpack(buf, 0, 8) << 8 |
@@ -208,6 +218,7 @@ static gboolean cdma_sms_decode_teleservice(const guint8 *buf, guint8 len,
static gboolean cdma_sms_decode_addr(const guint8 *buf, guint8 len,
void *data)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
struct cdma_sms_address *addr = data;
guint16 bit_offset = 0;
guint8 chari_len;
@@ -266,6 +277,7 @@ static gboolean cdma_sms_decode_addr(const guint8 *buf, guint8 len,
static char *decode_text_7bit_ascii(const struct cdma_sms_ud *ud)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
char *buf;
buf = g_new(char, ud->num_fields + 1);
@@ -280,6 +292,7 @@ static char *decode_text_7bit_ascii(const struct cdma_sms_ud *ud)
char *cdma_sms_decode_text(const struct cdma_sms_ud *ud)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
switch (ud->msg_encoding) {
case CDMA_SMS_MSG_ENCODING_OCTET:
case CDMA_SMS_MSG_ENCODING_EXTENDED_PROTOCOL_MSG:
@@ -303,6 +316,7 @@ char *cdma_sms_decode_text(const struct cdma_sms_ud *ud)
/* Decode User Data */
static gboolean cdma_sms_decode_ud(const guint8 *buf, guint8 len, void *data)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
guint16 bit_offset = 0;
guint8 chari_len = 0;
guint16 total_num_bits = len * 8;
@@ -378,6 +392,7 @@ static gboolean cdma_sms_decode_ud(const guint8 *buf, guint8 len, void *data)
static gboolean cdma_sms_decode_message_id(const guint8 *buf, guint8 len,
void *data)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
struct cdma_sms_identifier *id = data;
if (len != 3)
@@ -400,6 +415,7 @@ static gboolean cdma_sms_decode_message_id(const guint8 *buf, guint8 len,
static gboolean find_and_decode(struct simple_iter *iter, guint8 rec_id,
rec_handler handler, void *data)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
guint8 id;
guint8 len;
const guint8 *buf;
@@ -420,6 +436,7 @@ static gboolean find_and_decode(struct simple_iter *iter, guint8 rec_id,
static rec_handler subparam_handler_for_id(enum cdma_sms_subparam_id id)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
switch (id) {
case CDMA_SMS_SUBPARAM_ID_MESSAGE_ID:
return cdma_sms_decode_message_id;
@@ -463,6 +480,7 @@ struct subparam_handler_entry {
static gboolean decode_subparams(struct simple_iter *iter, guint32 *bitmap,
void *data, ...)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
GSList *entries = NULL;
GSList *l;
va_list args;
@@ -541,6 +559,7 @@ static gboolean decode_subparams(struct simple_iter *iter, guint32 *bitmap,
static gboolean cdma_sms_decode_wmt(struct simple_iter *iter,
struct cdma_sms_bearer_data *bd)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
switch (bd->id.msg_type) {
case CDMA_SMS_MSG_TYPE_RESERVED:
return FALSE; /* Invalid */
@@ -575,6 +594,7 @@ static gboolean p2p_decode_bearer_data(const guint8 *buf, guint8 len,
enum cdma_sms_teleservice_id tele_id,
struct cdma_sms_bearer_data *bd)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
struct simple_iter iter;
simple_iter_init(&iter, buf, len);
@@ -611,6 +631,7 @@ static gboolean p2p_decode_bearer_data(const guint8 *buf, guint8 len,
static gboolean cdma_sms_decode_bearer_data(const guint8 *buf, guint8 len,
void *data)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
struct cdma_sms *msg = data;
switch (msg->type) {
@@ -631,6 +652,7 @@ static rec_handler param_handler_for_id(enum cdma_sms_param_id id,
struct cdma_sms *incoming,
void **data)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
if (incoming->type != CDMA_SMS_TP_MSG_TYPE_P2P)
return NULL; /* TODO: Other types not supported yet */
@@ -660,6 +682,7 @@ static rec_handler param_handler_for_id(enum cdma_sms_param_id id,
static gboolean cdma_sms_p2p_decode(const guint8 *pdu, guint8 len,
struct cdma_sms *incoming)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
struct simple_iter iter;
simple_iter_init(&iter, pdu, len);
@@ -716,6 +739,7 @@ static gboolean cdma_sms_p2p_decode(const guint8 *pdu, guint8 len,
gboolean cdma_sms_decode(const guint8 *pdu, guint8 len,
struct cdma_sms *incoming)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
incoming->type = bit_field_unpack(pdu, 0, 8);
pdu += 1;
len -= 1;

View File

@@ -52,6 +52,7 @@ struct ofono_cdma_voicecall {
static const char *disconnect_reason_to_string(enum ofono_disconnect_reason r)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
switch (r) {
case OFONO_DISCONNECT_REASON_LOCAL_HANGUP:
return "local";
@@ -64,6 +65,7 @@ static const char *disconnect_reason_to_string(enum ofono_disconnect_reason r)
static const char *cdma_call_status_to_string(enum cdma_call_status status)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
switch (status) {
case CDMA_CALL_STATUS_ACTIVE:
return "active";
@@ -82,6 +84,7 @@ static const char *cdma_call_status_to_string(enum cdma_call_status status)
static const char *time_to_str(const time_t *t)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
static char buf[128];
struct tm tm;
@@ -93,6 +96,7 @@ static const char *time_to_str(const time_t *t)
static void generic_callback(const struct ofono_error *error, void *data)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
struct ofono_cdma_voicecall *vc = data;
DBusMessage *reply;
@@ -107,6 +111,7 @@ static void generic_callback(const struct ofono_error *error, void *data)
static void append_voicecall_properties(struct ofono_cdma_voicecall *vc,
DBusMessageIter *dict)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
const char *status;
const char *lineid;
const char *waiting_call;
@@ -140,6 +145,7 @@ static void append_voicecall_properties(struct ofono_cdma_voicecall *vc,
static DBusMessage *voicecall_manager_get_properties(DBusConnection *conn,
DBusMessage *msg, void *data)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
struct ofono_cdma_voicecall *vc = data;
DBusMessage *reply;
DBusMessageIter iter;
@@ -164,6 +170,7 @@ static DBusMessage *voicecall_manager_get_properties(DBusConnection *conn,
static void voicecall_emit_disconnect_reason(struct ofono_cdma_voicecall *vc,
enum ofono_disconnect_reason reason)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
DBusConnection *conn = ofono_dbus_get_connection();
const char *path = __ofono_atom_get_path(vc->atom);
const char *reason_str;
@@ -179,6 +186,7 @@ static void voicecall_emit_disconnect_reason(struct ofono_cdma_voicecall *vc,
static void voicecall_set_call_status(struct ofono_cdma_voicecall *vc,
enum cdma_call_status status)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
DBusConnection *conn = ofono_dbus_get_connection();
const char *path = __ofono_atom_get_path(vc->atom);
const char *status_str;
@@ -225,6 +233,7 @@ static void voicecall_set_call_status(struct ofono_cdma_voicecall *vc,
static void voicecall_set_call_lineid(struct ofono_cdma_voicecall *vc)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
DBusConnection *conn = ofono_dbus_get_connection();
const char *path = __ofono_atom_get_path(vc->atom);
const char *lineid_str;
@@ -240,6 +249,7 @@ static void voicecall_set_call_lineid(struct ofono_cdma_voicecall *vc)
static void manager_dial_callback(const struct ofono_error *error, void *data)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
struct ofono_cdma_voicecall *vc = data;
DBusMessage *reply;
@@ -261,6 +271,7 @@ static void manager_dial_callback(const struct ofono_error *error, void *data)
static DBusMessage *voicecall_manager_dial(DBusConnection *conn,
DBusMessage *msg, void *data)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
struct ofono_cdma_voicecall *vc = data;
const char *number;
@@ -291,6 +302,7 @@ static DBusMessage *voicecall_manager_dial(DBusConnection *conn,
static DBusMessage *voicecall_manager_hangup(DBusConnection *conn,
DBusMessage *msg, void *data)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
struct ofono_cdma_voicecall *vc = data;
if (vc->pending)
@@ -312,6 +324,7 @@ static DBusMessage *voicecall_manager_hangup(DBusConnection *conn,
static DBusMessage *voicecall_manager_answer(DBusConnection *conn,
DBusMessage *msg, void *data)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
struct ofono_cdma_voicecall *vc = data;
if (vc->pending)
@@ -333,6 +346,7 @@ static DBusMessage *voicecall_manager_answer(DBusConnection *conn,
static DBusMessage *voicecall_manager_flash(DBusConnection *conn,
DBusMessage *msg, void *data)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
struct ofono_cdma_voicecall *vc = data;
const char *string;
@@ -355,6 +369,7 @@ static DBusMessage *voicecall_manager_flash(DBusConnection *conn,
static ofono_bool_t is_valid_tones(const char *tones)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
int len;
int i;
@@ -379,6 +394,7 @@ static ofono_bool_t is_valid_tones(const char *tones)
static DBusMessage *voicecall_manager_tone(DBusConnection *conn,
DBusMessage *msg, void *data)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
struct ofono_cdma_voicecall *vc = data;
const char *tones;
@@ -436,6 +452,7 @@ void ofono_cdma_voicecall_disconnected(struct ofono_cdma_voicecall *vc,
enum ofono_disconnect_reason reason,
const struct ofono_error *error)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
DBG("Got disconnection event for reason: %d", reason);
if (reason != OFONO_DISCONNECT_REASON_UNKNOWN)
@@ -447,6 +464,7 @@ void ofono_cdma_voicecall_disconnected(struct ofono_cdma_voicecall *vc,
int ofono_cdma_voicecall_driver_register(
const struct ofono_cdma_voicecall_driver *d)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
DBG("driver: %p, name: %s", d, d->name);
if (d->probe == NULL)
@@ -460,6 +478,7 @@ int ofono_cdma_voicecall_driver_register(
void ofono_cdma_voicecall_driver_unregister(
const struct ofono_cdma_voicecall_driver *d)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
DBG("driver: %p, name: %s", d, d->name);
g_drivers = g_slist_remove(g_drivers, (void *)d);
@@ -467,6 +486,7 @@ void ofono_cdma_voicecall_driver_unregister(
static void cdma_voicecall_unregister(struct ofono_atom *atom)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
DBusConnection *conn = ofono_dbus_get_connection();
struct ofono_modem *modem = __ofono_atom_get_modem(atom);
const char *path = __ofono_atom_get_path(atom);
@@ -479,6 +499,7 @@ static void cdma_voicecall_unregister(struct ofono_atom *atom)
static void voicecall_manager_remove(struct ofono_atom *atom)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
struct ofono_cdma_voicecall *vc = __ofono_atom_get_data(atom);
DBG("atom: %p", atom);
@@ -498,6 +519,7 @@ struct ofono_cdma_voicecall *ofono_cdma_voicecall_create(
const char *driver,
void *data)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
struct ofono_cdma_voicecall *vc;
GSList *l;
@@ -532,6 +554,7 @@ struct ofono_cdma_voicecall *ofono_cdma_voicecall_create(
void ofono_cdma_voicecall_register(struct ofono_cdma_voicecall *vc)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
DBusConnection *conn = ofono_dbus_get_connection();
struct ofono_modem *modem = __ofono_atom_get_modem(vc->atom);
const char *path = __ofono_atom_get_path(vc->atom);
@@ -553,15 +576,18 @@ void ofono_cdma_voicecall_register(struct ofono_cdma_voicecall *vc)
void ofono_cdma_voicecall_remove(struct ofono_cdma_voicecall *vc)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
__ofono_atom_free(vc->atom);
}
void ofono_cdma_voicecall_set_data(struct ofono_cdma_voicecall *vc, void *data)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
vc->driver_data = data;
}
void *ofono_cdma_voicecall_get_data(struct ofono_cdma_voicecall *vc)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
return vc->driver_data;
}

View File

@@ -41,6 +41,7 @@ static inline CellInfoControlObject *cell_info_control_object_cast
static int cell_info_control_get_interval(CellInfoControlObject *self)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
int interval = INT_MAX;
if (self->set_interval) {
@@ -58,6 +59,7 @@ static int cell_info_control_get_interval(CellInfoControlObject *self)
static void cell_info_control_update_all(CellInfoControlObject *self)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
struct ofono_cell_info *cellinfo = self->pub.info;
if (cellinfo) {
@@ -76,6 +78,7 @@ static void cell_info_control_update_all(CellInfoControlObject *self)
static void cell_info_control_drop_all_requests_internal
(CellInfoControlObject *self)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
if (self->enabled) {
g_hash_table_destroy(self->enabled);
self->enabled = NULL;
@@ -88,6 +91,7 @@ static void cell_info_control_drop_all_requests_internal
static void cell_info_control_free(CellInfoControlObject *self)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
/* Destroy the table when the last instance is done */
g_hash_table_remove(cell_info_control_table, self->path);
if (g_hash_table_size(cell_info_control_table) == 0) {
@@ -104,6 +108,7 @@ static void cell_info_control_free(CellInfoControlObject *self)
CellInfoControl *cell_info_control_get(const char* path)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
if (path) {
CellInfoControlObject *self = NULL;
@@ -137,6 +142,7 @@ CellInfoControl *cell_info_control_get(const char* path)
CellInfoControl *cell_info_control_ref(CellInfoControl *ctl)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
CellInfoControlObject *self = cell_info_control_object_cast(ctl);
if (self) {
@@ -147,6 +153,7 @@ CellInfoControl *cell_info_control_ref(CellInfoControl *ctl)
void cell_info_control_unref(CellInfoControl *ctl)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
CellInfoControlObject *self = cell_info_control_object_cast(ctl);
if (self && !--self->refcount) {
@@ -157,6 +164,7 @@ void cell_info_control_unref(CellInfoControl *ctl)
void cell_info_control_set_cell_info(CellInfoControl *ctl,
struct ofono_cell_info *ci)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
CellInfoControlObject *self = cell_info_control_object_cast(ctl);
if (self && ctl->info != ci) {
@@ -168,6 +176,7 @@ void cell_info_control_set_cell_info(CellInfoControl *ctl,
void cell_info_control_drop_all_requests(CellInfoControl *ctl)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
CellInfoControlObject *self = cell_info_control_object_cast(ctl);
if (self) {
@@ -178,6 +187,7 @@ void cell_info_control_drop_all_requests(CellInfoControl *ctl)
void cell_info_control_drop_requests(CellInfoControl *ctl, void *tag)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
CellInfoControlObject *self = cell_info_control_object_cast(ctl);
if (self && tag) {
@@ -207,6 +217,7 @@ void cell_info_control_drop_requests(CellInfoControl *ctl, void *tag)
void cell_info_control_set_enabled(CellInfoControl *ctl,
void *tag, ofono_bool_t enabled)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
CellInfoControlObject *self = cell_info_control_object_cast(ctl);
if (self && tag) {
@@ -237,6 +248,7 @@ void cell_info_control_set_enabled(CellInfoControl *ctl,
void cell_info_control_set_update_interval(CellInfoControl *ctl,
void *tag, int ms)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
CellInfoControlObject *self = cell_info_control_object_cast(ctl);
if (self && tag) {

View File

@@ -131,12 +131,14 @@ typedef void (*cell_info_dbus_append_fn)(DBusMessageIter *it,
static void cell_info_dbus_set_updates_enabled(CellInfoDBus *dbus, gboolean on)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
cell_info_control_set_enabled(dbus->ctl, dbus, on);
cell_info_control_set_update_interval(dbus->ctl, dbus, on ? 5000 : -1);
}
static const char *cell_info_dbus_cell_type_str(enum ofono_cell_type type)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
switch (type) {
case OFONO_CELL_TYPE_GSM:
return "gsm";
@@ -154,6 +156,7 @@ static const char *cell_info_dbus_cell_type_str(enum ofono_cell_type type)
static const struct cell_property *cell_info_dbus_cell_properties
(enum ofono_cell_type type, int *count)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
switch (type) {
case OFONO_CELL_TYPE_GSM:
*count = G_N_ELEMENTS(cell_gsm_properties);
@@ -175,6 +178,7 @@ static const struct cell_property *cell_info_dbus_cell_properties
static void cell_info_destroy_entry(CellEntry *entry)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
if (entry) {
g_free(entry->path);
g_free(entry);
@@ -184,6 +188,7 @@ static void cell_info_destroy_entry(CellEntry *entry)
static DBusMessage *cell_info_dbus_reply(DBusMessage *msg,
const CellEntry *entry, cell_info_dbus_append_fn append)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
DBusMessage *reply = dbus_message_new_method_return(msg);
DBusMessageIter it;
@@ -195,6 +200,7 @@ static DBusMessage *cell_info_dbus_reply(DBusMessage *msg,
static void cell_info_dbus_append_version(DBusMessageIter *it,
const CellEntry *entry)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
dbus_int32_t version = CELL_DBUS_INTERFACE_VERSION;
dbus_message_iter_append_basic(it, DBUS_TYPE_INT32, &version);
@@ -203,6 +209,7 @@ static void cell_info_dbus_append_version(DBusMessageIter *it,
static void cell_info_dbus_append_type(DBusMessageIter *it,
const CellEntry *entry)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
const char *type = cell_info_dbus_cell_type_str(entry->cell.type);
dbus_message_iter_append_basic(it, DBUS_TYPE_STRING, &type);
@@ -211,6 +218,7 @@ static void cell_info_dbus_append_type(DBusMessageIter *it,
static void cell_info_dbus_append_registered(DBusMessageIter *it,
const CellEntry *entry)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
const dbus_bool_t registered = (entry->cell.registered != FALSE);
dbus_message_iter_append_basic(it, DBUS_TYPE_BOOLEAN, &registered);
@@ -219,6 +227,7 @@ static void cell_info_dbus_append_registered(DBusMessageIter *it,
static void cell_info_dbus_append_properties(DBusMessageIter *it,
const CellEntry *entry)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
int i, n;
DBusMessageIter dict;
const struct ofono_cell *cell = &entry->cell;
@@ -246,6 +255,7 @@ static void cell_info_dbus_append_properties(DBusMessageIter *it,
static void cell_info_dbus_append_all(DBusMessageIter *it, const CellEntry *ce)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
cell_info_dbus_append_version(it, ce);
cell_info_dbus_append_type(it, ce);
cell_info_dbus_append_registered(it, ce);
@@ -255,6 +265,7 @@ static void cell_info_dbus_append_all(DBusMessageIter *it, const CellEntry *ce)
static DBusMessage *cell_info_dbus_cell_get_all(DBusConnection *conn,
DBusMessage *msg, void *data)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
return cell_info_dbus_reply(msg, (CellEntry*) data,
cell_info_dbus_append_all);
}
@@ -262,6 +273,7 @@ static DBusMessage *cell_info_dbus_cell_get_all(DBusConnection *conn,
static DBusMessage *cell_info_dbus_cell_get_version(DBusConnection *conn,
DBusMessage *msg, void *data)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
return cell_info_dbus_reply(msg, (CellEntry*) data,
cell_info_dbus_append_version);
}
@@ -269,6 +281,7 @@ static DBusMessage *cell_info_dbus_cell_get_version(DBusConnection *conn,
static DBusMessage *cell_info_dbus_cell_get_type(DBusConnection *conn,
DBusMessage *msg, void *data)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
return cell_info_dbus_reply(msg, (CellEntry*) data,
cell_info_dbus_append_type);
}
@@ -276,6 +289,7 @@ static DBusMessage *cell_info_dbus_cell_get_type(DBusConnection *conn,
static DBusMessage *cell_info_dbus_cell_get_registered(DBusConnection *conn,
DBusMessage *msg, void *data)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
return cell_info_dbus_reply(msg, (CellEntry*) data,
cell_info_dbus_append_registered);
}
@@ -283,6 +297,7 @@ static DBusMessage *cell_info_dbus_cell_get_registered(DBusConnection *conn,
static DBusMessage *cell_info_dbus_cell_get_properties(DBusConnection *conn,
DBusMessage *msg, void *data)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
return cell_info_dbus_reply(msg, (CellEntry*) data,
cell_info_dbus_append_properties);
}
@@ -321,6 +336,7 @@ static const GDBusSignalTable cell_info_dbus_cell_signals[] = {
static CellEntry *cell_info_dbus_find_id(CellInfoDBus *dbus, guint id)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
GSList *l;
for (l = dbus->entries; l; l = l->next) {
@@ -335,6 +351,7 @@ static CellEntry *cell_info_dbus_find_id(CellInfoDBus *dbus, guint id)
static guint cell_info_dbus_next_cell_id(CellInfoDBus *dbus)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
while (cell_info_dbus_find_id(dbus, dbus->next_cell_id)) {
dbus->next_cell_id++;
}
@@ -344,6 +361,7 @@ static guint cell_info_dbus_next_cell_id(CellInfoDBus *dbus)
static const struct ofono_cell *cell_info_dbus_find_ofono_cell
(struct ofono_cell_info *info, const struct ofono_cell *cell)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
const ofono_cell_ptr *c;
for (c = info->cells; *c; c++) {
@@ -357,6 +375,7 @@ static const struct ofono_cell *cell_info_dbus_find_ofono_cell
static CellEntry *cell_info_dbus_find_cell(CellInfoDBus *dbus,
const struct ofono_cell *cell)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
if (cell) {
GSList *l;
@@ -374,6 +393,7 @@ static CellEntry *cell_info_dbus_find_cell(CellInfoDBus *dbus,
static void cell_info_dbus_emit_path_list(CellInfoDBus *dbus, const char *name,
GPtrArray *list)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
if (ofono_dbus_clients_count(dbus->clients)) {
guint i;
DBusMessageIter it, a;
@@ -397,6 +417,7 @@ static void cell_info_dbus_emit_path_list(CellInfoDBus *dbus, const char *name,
static int cell_info_dbus_compare(const struct ofono_cell *c1,
const struct ofono_cell *c2)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
if (c1->type == c2->type) {
int i, n, mask = 0;
const struct cell_property *prop =
@@ -434,6 +455,7 @@ static int cell_info_dbus_compare(const struct ofono_cell *c1,
static void cell_info_dbus_emit_signal(CellInfoDBus *dbus, const char *path,
const char *intf, const char *name, int type, ...)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
if (ofono_dbus_clients_count(dbus->clients)) {
va_list args;
DBusMessage *signal = dbus_message_new_signal(path, intf, name);
@@ -449,6 +471,7 @@ static void cell_info_dbus_emit_signal(CellInfoDBus *dbus, const char *path,
static void cell_info_dbus_property_changed(CellInfoDBus *dbus,
const CellEntry *entry, int mask)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
int i, n;
const struct ofono_cell *cell = &entry->cell;
const struct cell_property *prop =
@@ -478,6 +501,7 @@ static void cell_info_dbus_property_changed(CellInfoDBus *dbus,
static void cell_info_dbus_update_entries(CellInfoDBus *dbus, gboolean emit)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
GSList *l;
GPtrArray* added = NULL;
GPtrArray* removed = NULL;
@@ -566,6 +590,7 @@ static void cell_info_dbus_update_entries(CellInfoDBus *dbus, gboolean emit)
static void cell_info_dbus_cells_changed_cb(struct ofono_cell_info *info,
void *data)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
DBG("");
cell_info_dbus_update_entries((CellInfoDBus *) data, TRUE);
}
@@ -573,6 +598,7 @@ static void cell_info_dbus_cells_changed_cb(struct ofono_cell_info *info,
static DBusMessage *cell_info_dbus_error_failed(DBusMessage *msg,
const char *explanation)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
return g_dbus_create_error(msg, OFONO_ERROR_INTERFACE ".Failed", "%s",
explanation);
}
@@ -580,6 +606,7 @@ static DBusMessage *cell_info_dbus_error_failed(DBusMessage *msg,
static DBusMessage *cell_info_dbus_get_cells(DBusConnection *conn,
DBusMessage *msg, void *data)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
CellInfoDBus *dbus = data;
const char *sender = dbus_message_get_sender(msg);
@@ -606,6 +633,7 @@ static DBusMessage *cell_info_dbus_get_cells(DBusConnection *conn,
static DBusMessage *cell_info_dbus_unsubscribe(DBusConnection *conn,
DBusMessage *msg, void *data)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
CellInfoDBus *dbus = data;
const char *sender = dbus_message_get_sender(msg);
@@ -646,6 +674,7 @@ static const GDBusSignalTable cell_info_dbus_signals[] = {
static void cell_info_dbus_disconnect_cb(const char *name, void *data)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
CellInfoDBus *dbus = data;
if (!ofono_dbus_clients_count(dbus->clients)) {
@@ -656,6 +685,7 @@ static void cell_info_dbus_disconnect_cb(const char *name, void *data)
CellInfoDBus *cell_info_dbus_new(struct ofono_modem *modem,
CellInfoControl *ctl)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
if (modem && ctl && ctl->info) {
struct ofono_cell_info *info = ctl->info;
CellInfoDBus *dbus = g_new0(CellInfoDBus, 1);
@@ -690,6 +720,7 @@ CellInfoDBus *cell_info_dbus_new(struct ofono_modem *modem,
void cell_info_dbus_free(CellInfoDBus *dbus)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
if (dbus) {
GSList *l;

View File

@@ -18,6 +18,7 @@
int ofono_cell_compare_location(const struct ofono_cell *c1,
const struct ofono_cell *c2)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
if (c1 && c2) {
if (c1->type != c2->type) {
return c1->type - c2->type;
@@ -102,6 +103,7 @@ int ofono_cell_compare_location(const struct ofono_cell *c1,
struct ofono_cell_info *ofono_cell_info_ref(struct ofono_cell_info *ci)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
if (ci && ci->proc->ref) {
ci->proc->ref(ci);
}
@@ -110,6 +112,7 @@ struct ofono_cell_info *ofono_cell_info_ref(struct ofono_cell_info *ci)
void ofono_cell_info_unref(struct ofono_cell_info *ci)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
if (ci && ci->proc->unref) {
ci->proc->unref(ci);
}
@@ -118,6 +121,7 @@ void ofono_cell_info_unref(struct ofono_cell_info *ci)
unsigned long ofono_cell_info_add_change_handler(struct ofono_cell_info *ci,
ofono_cell_info_cb_t cb, void *data)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
return (ci && ci->proc->add_change_handler && cb) ?
ci->proc->add_change_handler(ci, cb, data) : 0;
}
@@ -125,6 +129,7 @@ unsigned long ofono_cell_info_add_change_handler(struct ofono_cell_info *ci,
void ofono_cell_info_remove_handler(struct ofono_cell_info *ci,
unsigned long id)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
if (ci && ci->proc->remove_handler && id) {
ci->proc->remove_handler(ci, id);
}
@@ -132,6 +137,7 @@ void ofono_cell_info_remove_handler(struct ofono_cell_info *ci,
void ofono_cell_info_set_update_interval(struct ofono_cell_info *ci, int ms)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
if (ci && ci->proc->set_update_interval) {
ci->proc->set_update_interval(ci, ms);
}
@@ -140,6 +146,7 @@ void ofono_cell_info_set_update_interval(struct ofono_cell_info *ci, int ms)
void ofono_cell_info_set_enabled(struct ofono_cell_info *ci,
ofono_bool_t enabled)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
if (ci && ci->proc->set_enabled) {
ci->proc->set_enabled(ci, enabled);
}

View File

@@ -239,6 +239,7 @@ struct error_entry ceer_errors[] = {
gboolean valid_number_format(const char *number, int length)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
int len = strlen(number);
int begin = 0;
int i;
@@ -276,16 +277,19 @@ gboolean valid_number_format(const char *number, int length)
*/
gboolean valid_phone_number_format(const char *number)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
return valid_number_format(number, 20);
}
gboolean valid_long_phone_number_format(const char *number)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
return valid_number_format(number, OFONO_MAX_PHONE_NUMBER_LENGTH);
}
gboolean valid_cdma_phone_number_format(const char *number)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
int len = strlen(number);
int i;
@@ -310,6 +314,7 @@ gboolean valid_cdma_phone_number_format(const char *number)
const char *telephony_error_to_str(const struct ofono_error *error)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
struct error_entry *e;
int maxentries;
int i;
@@ -340,6 +345,7 @@ const char *telephony_error_to_str(const struct ofono_error *error)
int mmi_service_code_to_bearer_class(int code)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
int cls = 0;
/*
@@ -426,6 +432,7 @@ int mmi_service_code_to_bearer_class(int code)
const char *ofono_phone_number_to_string(const struct ofono_phone_number *ph,
char buffer[/* OFONO_PHONE_NUMBER_BUFFER_SIZE */])
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
if (ph->type == 145 && (strlen(ph->number) > 0) &&
ph->number[0] != '+') {
buffer[0] = '+';
@@ -441,6 +448,7 @@ const char *ofono_phone_number_to_string(const struct ofono_phone_number *ph,
const char *phone_number_to_string(const struct ofono_phone_number *ph)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
static char buffer[OFONO_PHONE_NUMBER_BUFFER_SIZE];
return ofono_phone_number_to_string(ph, buffer);
@@ -448,6 +456,7 @@ const char *phone_number_to_string(const struct ofono_phone_number *ph)
void string_to_phone_number(const char *str, struct ofono_phone_number *ph)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
if (str[0] == '+') {
strcpy(ph->number, str+1);
ph->type = 145; /* International */
@@ -460,6 +469,7 @@ void string_to_phone_number(const char *str, struct ofono_phone_number *ph)
const char *cdma_phone_number_to_string(
const struct ofono_cdma_phone_number *ph)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
static char buffer[OFONO_CDMA_MAX_PHONE_NUMBER_LENGTH + 1];
strncpy(buffer, ph->number, OFONO_CDMA_MAX_PHONE_NUMBER_LENGTH);
@@ -471,11 +481,13 @@ const char *cdma_phone_number_to_string(
void string_to_cdma_phone_number(const char *str,
struct ofono_cdma_phone_number *ph)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
strcpy(ph->number, str);
}
gboolean valid_ussd_string(const char *str, gboolean call_in_progress)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
int len = strlen(str);
if (!len)
@@ -511,6 +523,7 @@ gboolean valid_ussd_string(const char *str, gboolean call_in_progress)
const char *ss_control_type_to_string(enum ss_control_type type)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
switch (type) {
case SS_CONTROL_TYPE_ACTIVATION:
return "activation";
@@ -547,6 +560,7 @@ gboolean parse_ss_control_string(char *str, int *ss_type,
char **sib, char **sic,
char **sid, char **dn)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
int len = strlen(str);
int cur = 0;
char *c;
@@ -636,6 +650,7 @@ static const char *bearer_class_lut[] = {
const char *bearer_class_to_string(enum bearer_class cls)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
switch (cls) {
case BEARER_CLASS_VOICE:
return bearer_class_lut[0];
@@ -663,6 +678,7 @@ const char *bearer_class_to_string(enum bearer_class cls)
const char *registration_status_to_string(enum ofono_netreg_status status)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
switch (status) {
case NETWORK_REGISTRATION_STATUS_NOT_REGISTERED:
return "unregistered";
@@ -689,6 +705,7 @@ const char *registration_status_to_string(enum ofono_netreg_status status)
const char *registration_tech_to_string(enum ofono_access_technology tech)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
switch (tech) {
case ACCESS_TECHNOLOGY_GSM:
return "gsm";
@@ -726,6 +743,7 @@ const char *registration_tech_to_string(enum ofono_access_technology tech)
gboolean is_valid_apn(const char *apn)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
int i;
int last_period = 0;
@@ -758,6 +776,7 @@ gboolean is_valid_apn(const char *apn)
const char *ofono_uuid_to_str(const struct ofono_uuid *uuid)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
static char buf[OFONO_SHA1_UUID_LEN * 2 + 1];
return encode_hex_own_buf(uuid->uuid, OFONO_SHA1_UUID_LEN, 0, buf);
@@ -765,6 +784,7 @@ const char *ofono_uuid_to_str(const struct ofono_uuid *uuid)
void ofono_call_init(struct ofono_call *call)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
memset(call, 0, sizeof(struct ofono_call));
call->cnap_validity = CNAP_VALIDITY_NOT_AVAILABLE;
call->clip_validity = CLIP_VALIDITY_NOT_AVAILABLE;
@@ -772,6 +792,7 @@ void ofono_call_init(struct ofono_call *call)
const char *call_status_to_string(enum call_status status)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
switch (status) {
case CALL_STATUS_ACTIVE:
return "active";
@@ -796,16 +817,19 @@ const char *call_status_to_string(enum call_status status)
const char *ofono_netreg_status_to_string(enum ofono_netreg_status status)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
return registration_status_to_string(status);
}
const char *ofono_access_technology_to_string(enum ofono_access_technology tech)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
return registration_tech_to_string(tech);
}
const char *gprs_proto_to_string(enum ofono_gprs_proto proto)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
switch (proto) {
case OFONO_GPRS_PROTO_IP:
return "ip";
@@ -820,6 +844,7 @@ const char *gprs_proto_to_string(enum ofono_gprs_proto proto)
gboolean gprs_proto_from_string(const char *str, enum ofono_gprs_proto *proto)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
if (g_str_equal(str, "ip")) {
*proto = OFONO_GPRS_PROTO_IP;
return TRUE;
@@ -836,6 +861,7 @@ gboolean gprs_proto_from_string(const char *str, enum ofono_gprs_proto *proto)
const char *gprs_auth_method_to_string(enum ofono_gprs_auth_method auth)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
switch (auth) {
case OFONO_GPRS_AUTH_METHOD_CHAP:
return "chap";
@@ -853,6 +879,7 @@ const char *gprs_auth_method_to_string(enum ofono_gprs_auth_method auth)
gboolean gprs_auth_method_from_string(const char *str,
enum ofono_gprs_auth_method *auth)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
if (g_str_equal(str, "chap")) {
*auth = OFONO_GPRS_AUTH_METHOD_CHAP;
return TRUE;

View File

@@ -84,6 +84,7 @@
static gint conf_sort_files(gconstpointer a, gconstpointer b)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
/* The comparison function for g_ptr_array_sort() doesn't take
* the pointers from the array as arguments, it takes pointers
* to the pointers in the array. */
@@ -92,6 +93,7 @@ static gint conf_sort_files(gconstpointer a, gconstpointer b)
static char **conf_collect_files(const char *path, const char *suffix)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
/* Returns sorted list of regular files in the directory,
* optionally having the specified suffix (e.g. ".conf").
* Returns NULL if nothing appropriate has been found. */
@@ -134,6 +136,7 @@ static char **conf_collect_files(const char *path, const char *suffix)
static int conf_list_find(char **list, gsize len, const char *value)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
guint i;
for (i = 0; i < len; i++) {
@@ -148,6 +151,7 @@ static int conf_list_find(char **list, gsize len, const char *value)
static void conf_list_append(GKeyFile *conf, GKeyFile *k, const char *group,
const char *key, char **values, gsize n, gboolean unique)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
/* Note: will steal strings from values */
if (n > 0) {
int i;
@@ -189,6 +193,7 @@ static void conf_list_append(GKeyFile *conf, GKeyFile *k, const char *group,
static void conf_list_remove(GKeyFile *conf, GKeyFile *k,
const char *group, const char *key, char **values, gsize n)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
if (n > 0) {
gsize len = 0;
gchar **list = g_key_file_get_string_list(conf, group, key,
@@ -223,6 +228,7 @@ static void conf_list_remove(GKeyFile *conf, GKeyFile *k,
static void conf_merge_group(GKeyFile *conf, GKeyFile *k, const char *group)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
gsize i, n = 0;
char **keys = g_key_file_get_keys(k, group, &n, NULL);
@@ -284,6 +290,7 @@ static void conf_merge_group(GKeyFile *conf, GKeyFile *k, const char *group)
static void conf_merge_keyfile(GKeyFile *conf, GKeyFile *k)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
gsize i, n = 0;
char **groups = g_key_file_get_groups(k, &n);
@@ -302,6 +309,7 @@ static void conf_merge_keyfile(GKeyFile *conf, GKeyFile *k)
static void conf_merge_file(GKeyFile *conf, const char *file)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
GKeyFile *k = g_key_file_new();
g_key_file_set_list_separator(k, ',');
@@ -315,6 +323,7 @@ static void conf_merge_file(GKeyFile *conf, const char *file)
void ofono_conf_merge_files(GKeyFile *conf, const char *file)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
if (conf && file && file[0]) {
char *dot = strrchr(file, '.');
const char *suffix;
@@ -359,6 +368,7 @@ void ofono_conf_merge_files(GKeyFile *conf, const char *file)
char *ofono_conf_get_string(GKeyFile *file, const char *group, const char *key)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
char *val = g_key_file_get_string(file, group, key, NULL);
if (!val && strcmp(group, OFONO_COMMON_SETTINGS_GROUP)) {
@@ -372,6 +382,7 @@ char *ofono_conf_get_string(GKeyFile *file, const char *group, const char *key)
char **ofono_conf_get_strings(GKeyFile *file, const char *group,
const char *key, char delimiter)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
char *str = ofono_conf_get_string(file, group, key);
if (str) {
@@ -397,6 +408,7 @@ char **ofono_conf_get_strings(GKeyFile *file, const char *group,
gboolean ofono_conf_get_integer(GKeyFile *file, const char *group,
const char *key, int *out_value)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
GError *error = NULL;
int value = g_key_file_get_integer(file, group, key, &error);
@@ -427,6 +439,7 @@ gboolean ofono_conf_get_integer(GKeyFile *file, const char *group,
gboolean ofono_conf_get_boolean(GKeyFile *file, const char *group,
const char *key, gboolean *out_value)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
GError *error = NULL;
gboolean value = g_key_file_get_boolean(file, group, key, &error);
@@ -457,6 +470,7 @@ gboolean ofono_conf_get_boolean(GKeyFile *file, const char *group,
gboolean ofono_conf_get_flag(GKeyFile *file, const char *group,
const char *key, int flag, int *flags)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
gboolean value;
if (ofono_conf_get_boolean(file, group, key, &value)) {
@@ -474,6 +488,7 @@ gboolean ofono_conf_get_flag(GKeyFile *file, const char *group,
gboolean ofono_conf_get_enum(GKeyFile *file, const char *group,
const char *key, int *result, const char *name, int value, ...)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
char *str = ofono_conf_get_string(file, group, key);
if (str) {
@@ -517,6 +532,7 @@ gboolean ofono_conf_get_enum(GKeyFile *file, const char *group,
gboolean ofono_conf_get_mask(GKeyFile *file, const char *group,
const char *key, int *result, const char *name, int value, ...)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
char *str = ofono_conf_get_string(file, group, key);
gboolean ok = FALSE;

View File

@@ -50,6 +50,7 @@ struct ofono_ctm {
static DBusMessage *ctm_get_properties_reply(DBusMessage *msg,
struct ofono_ctm *ctm)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
DBusMessage *reply;
DBusMessageIter iter;
DBusMessageIter dict;
@@ -73,6 +74,7 @@ static DBusMessage *ctm_get_properties_reply(DBusMessage *msg,
static void ctm_signal_enabled(struct ofono_ctm *ctm)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
DBusConnection *conn = ofono_dbus_get_connection();
const char *path = __ofono_atom_get_path(ctm->atom);
ofono_bool_t value = ctm->enabled;
@@ -86,6 +88,7 @@ static void ctm_signal_enabled(struct ofono_ctm *ctm)
static void ctm_set_enabled_callback(const struct ofono_error *error,
void *data)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
struct ofono_ctm *ctm = data;
DBusMessage *reply;
@@ -109,6 +112,7 @@ static void ctm_set_enabled_callback(const struct ofono_error *error,
static void ctm_query_enabled_callback(const struct ofono_error *error,
ofono_bool_t enable, void *data)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
struct ofono_ctm *ctm = data;
DBusMessage *reply;
ofono_bool_t enabled_old;
@@ -137,6 +141,7 @@ static void ctm_query_enabled_callback(const struct ofono_error *error,
static DBusMessage *ctm_get_properties(DBusConnection *conn,
DBusMessage *msg, void *data)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
struct ofono_ctm *ctm = data;
if (ctm->flags & CTM_FLAG_CACHED)
@@ -155,6 +160,7 @@ static DBusMessage *ctm_get_properties(DBusConnection *conn,
static DBusMessage *ctm_set_property(DBusConnection *conn, DBusMessage *msg,
void *data)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
struct ofono_ctm *ctm = data;
DBusMessageIter iter;
DBusMessageIter var;
@@ -218,6 +224,7 @@ static const GDBusSignalTable ctm_signals[] = {
int ofono_ctm_driver_register(const struct ofono_ctm_driver *d)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
DBG("driver: %p, name: %s", d, d->name);
if (d == NULL || d->probe == NULL)
@@ -230,6 +237,7 @@ int ofono_ctm_driver_register(const struct ofono_ctm_driver *d)
void ofono_ctm_driver_unregister(const struct ofono_ctm_driver *d)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
DBG("driver: %p, name: %s", d, d->name);
if (d == NULL)
@@ -240,6 +248,7 @@ void ofono_ctm_driver_unregister(const struct ofono_ctm_driver *d)
static void text_telephony_unregister(struct ofono_atom *atom)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
struct ofono_ctm *ctm = __ofono_atom_get_data(atom);
const char *path = __ofono_atom_get_path(ctm->atom);
DBusConnection *conn = ofono_dbus_get_connection();
@@ -251,6 +260,7 @@ static void text_telephony_unregister(struct ofono_atom *atom)
static void text_telephony_remove(struct ofono_atom *atom)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
struct ofono_ctm *ctm = __ofono_atom_get_data(atom);
DBG("atom: %p", atom);
@@ -268,6 +278,7 @@ struct ofono_ctm *ofono_ctm_create(struct ofono_modem *modem,
unsigned int vendor,
const char *driver, void *data)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
struct ofono_ctm *ctm;
GSList *l;
@@ -299,6 +310,7 @@ struct ofono_ctm *ofono_ctm_create(struct ofono_modem *modem,
void ofono_ctm_register(struct ofono_ctm *ctm)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
DBusConnection *conn = ofono_dbus_get_connection();
struct ofono_modem *modem = __ofono_atom_get_modem(ctm->atom);
const char *path = __ofono_atom_get_path(ctm->atom);
@@ -319,15 +331,18 @@ void ofono_ctm_register(struct ofono_ctm *ctm)
void ofono_ctm_remove(struct ofono_ctm *ctm)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
__ofono_atom_free(ctm->atom);
}
void ofono_ctm_set_data(struct ofono_ctm *ctm, void *data)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
ctm->driver_data = data;
}
void *ofono_ctm_get_data(struct ofono_ctm *ctm)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
return ctm->driver_data;
}

View File

@@ -23,6 +23,7 @@ static GSList *dbus_access_plugins = NULL;
const char *ofono_dbus_access_intf_name(enum ofono_dbus_access_intf intf)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
switch (intf) {
case OFONO_DBUS_ACCESS_INTF_MESSAGE:
return OFONO_MESSAGE_INTERFACE;
@@ -57,6 +58,7 @@ const char *ofono_dbus_access_intf_name(enum ofono_dbus_access_intf intf)
const char *ofono_dbus_access_method_name(enum ofono_dbus_access_intf intf,
int method)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
switch (intf) {
case OFONO_DBUS_ACCESS_INTF_MESSAGE:
switch ((enum ofono_dbus_access_message_method)method) {
@@ -212,6 +214,7 @@ ofono_bool_t ofono_dbus_access_method_allowed(const char *sender,
enum ofono_dbus_access_intf intf,
int method, const char *arg)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
GSList *l = dbus_access_plugins;
while (l) {
@@ -240,6 +243,7 @@ ofono_bool_t ofono_dbus_access_method_allowed(const char *sender,
*/
static gint ofono_dbus_access_plugin_sort(gconstpointer a, gconstpointer b)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
const struct ofono_dbus_access_plugin *a_plugin = a;
const struct ofono_dbus_access_plugin *b_plugin = b;
@@ -258,6 +262,7 @@ static gint ofono_dbus_access_plugin_sort(gconstpointer a, gconstpointer b)
int ofono_dbus_access_plugin_register
(const struct ofono_dbus_access_plugin *plugin)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
if (!plugin || !plugin->name) {
return -EINVAL;
} else if (g_slist_find(dbus_access_plugins, plugin)) {
@@ -273,6 +278,7 @@ int ofono_dbus_access_plugin_register
void ofono_dbus_access_plugin_unregister
(const struct ofono_dbus_access_plugin *plugin)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
if (plugin) {
DBG("%s", plugin->name);
dbus_access_plugins = g_slist_remove(dbus_access_plugins,

View File

@@ -34,6 +34,7 @@ struct ofono_dbus_clients {
/* Compatible with GDestroyNotify */
static void ofono_dbus_client_free(struct ofono_dbus_client *client)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
struct ofono_dbus_clients *clients = client->clients;
/* Callers make sure that client parameter is not NULL */
@@ -47,6 +48,7 @@ static void ofono_dbus_client_free(struct ofono_dbus_client *client)
static void ofono_dbus_clients_disconnect_notify(DBusConnection *connection,
void *user_data)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
struct ofono_dbus_client *client = user_data;
struct ofono_dbus_clients *self = client->clients;
char *name = client->name;
@@ -69,6 +71,7 @@ static void ofono_dbus_clients_disconnect_notify(DBusConnection *connection,
struct ofono_dbus_clients *ofono_dbus_clients_new(DBusConnection *conn,
ofono_dbus_clients_notify_func notify, void *user_data)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
if (conn) {
struct ofono_dbus_clients *self =
g_slice_new0(struct ofono_dbus_clients);
@@ -85,6 +88,7 @@ struct ofono_dbus_clients *ofono_dbus_clients_new(DBusConnection *conn,
void ofono_dbus_clients_free(struct ofono_dbus_clients *self)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
if (self) {
g_hash_table_destroy(self->table);
dbus_connection_unref(self->conn);
@@ -94,12 +98,14 @@ void ofono_dbus_clients_free(struct ofono_dbus_clients *self)
unsigned int ofono_dbus_clients_count(struct ofono_dbus_clients *self)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
return self ? g_hash_table_size(self->table) : 0;
}
ofono_bool_t ofono_dbus_clients_add(struct ofono_dbus_clients *self,
const char *name)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
if (self && name) {
struct ofono_dbus_client *client =
g_slice_new0(struct ofono_dbus_client);
@@ -126,12 +132,14 @@ ofono_bool_t ofono_dbus_clients_add(struct ofono_dbus_clients *self,
ofono_bool_t ofono_dbus_clients_remove(struct ofono_dbus_clients *self,
const char *name)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
return self && name && g_hash_table_remove(self->table, name);
}
void ofono_dbus_clients_signal(struct ofono_dbus_clients *self,
DBusMessage *signal)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
if (self && signal && g_hash_table_size(self->table)) {
GHashTableIter it;
gpointer key;
@@ -164,6 +172,7 @@ void ofono_dbus_clients_signal_property_changed(struct ofono_dbus_clients *self,
const char *path, const char *interface, const char *name,
int type, const void *value)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
if (self && g_hash_table_size(self->table)) {
DBusMessage *sig = ofono_dbus_signal_new_property_changed(path,
interface, name, type, value);

View File

@@ -32,12 +32,14 @@ struct ofono_dbus_queue_request {
struct ofono_dbus_queue *__ofono_dbus_queue_new()
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
return g_new0(struct ofono_dbus_queue, 1);
}
static struct ofono_dbus_queue_request *__ofono_dbus_queue_req_new
(ofono_dbus_cb_t fn, DBusMessage *msg, void *data)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
struct ofono_dbus_queue_request *req =
g_slice_new0(struct ofono_dbus_queue_request);
@@ -49,6 +51,7 @@ static struct ofono_dbus_queue_request *__ofono_dbus_queue_req_new
static void __ofono_dbus_queue_req_free(struct ofono_dbus_queue_request *req)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
g_slice_free1(sizeof(*req), req);
}
@@ -56,6 +59,7 @@ static void __ofono_dbus_queue_req_complete
(struct ofono_dbus_queue_request *req,
ofono_dbus_cb_t fn, void *param)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
DBusMessage *reply = fn ? fn(req->msg, param) : NULL;
if (!reply)
@@ -67,6 +71,7 @@ static void __ofono_dbus_queue_req_complete
void __ofono_dbus_queue_free(struct ofono_dbus_queue *q)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
if (q) {
while (q->requests) {
struct ofono_dbus_queue_request *req = q->requests;
@@ -83,12 +88,14 @@ void __ofono_dbus_queue_free(struct ofono_dbus_queue *q)
ofono_bool_t __ofono_dbus_queue_pending(struct ofono_dbus_queue *q)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
return q && q->requests;
}
ofono_bool_t __ofono_dbus_queue_set_pending(struct ofono_dbus_queue *q,
DBusMessage *msg)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
if (!q || q->requests)
return FALSE;
@@ -99,6 +106,7 @@ ofono_bool_t __ofono_dbus_queue_set_pending(struct ofono_dbus_queue *q,
void __ofono_dbus_queue_request(struct ofono_dbus_queue *q,
ofono_dbus_cb_t fn, DBusMessage *msg, void *data)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
struct ofono_dbus_queue_request *req =
__ofono_dbus_queue_req_new(fn, msg, data);
@@ -123,6 +131,7 @@ void __ofono_dbus_queue_request(struct ofono_dbus_queue *q,
static void __ofono_dbus_queue_submit_next(struct ofono_dbus_queue *q)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
struct ofono_dbus_queue_request *next = q->requests;
while (next) {
@@ -149,6 +158,7 @@ static void __ofono_dbus_queue_submit_next(struct ofono_dbus_queue *q)
void __ofono_dbus_queue_reply_msg(struct ofono_dbus_queue *q,
DBusMessage *reply)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
struct ofono_dbus_queue_request *done, *next;
if (!q || !q->requests) {
@@ -179,40 +189,47 @@ void __ofono_dbus_queue_reply_msg(struct ofono_dbus_queue *q,
void __ofono_dbus_queue_reply_ok(struct ofono_dbus_queue *q)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
__ofono_dbus_queue_reply_fn(q, dbus_message_new_method_return);
}
void __ofono_dbus_queue_reply_failed(struct ofono_dbus_queue *q)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
__ofono_dbus_queue_reply_fn(q, __ofono_error_failed);
}
void __ofono_dbus_queue_reply_fn(struct ofono_dbus_queue *q,
ofono_dbus_reply_cb_t fn)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
if (q && q->requests)
__ofono_dbus_queue_reply_msg(q, fn(q->requests->msg));
}
void __ofono_dbus_queue_reply_all_ok(struct ofono_dbus_queue *q)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
__ofono_dbus_queue_reply_all_fn(q, dbus_message_new_method_return);
}
void __ofono_dbus_queue_reply_all_failed(struct ofono_dbus_queue *q)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
__ofono_dbus_queue_reply_all_fn(q, __ofono_error_failed);
}
static DBusMessage * __ofono_dbus_queue_reply_all_error_cb(DBusMessage *msg,
void *data)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
return __ofono_error_from_error((const struct ofono_error *)data, msg);
}
void __ofono_dbus_queue_reply_all_error(struct ofono_dbus_queue *q,
const struct ofono_error *error)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
if (error) {
__ofono_dbus_queue_reply_all_fn_param(q,
__ofono_dbus_queue_reply_all_error_cb, (void*) error);
@@ -224,12 +241,14 @@ void __ofono_dbus_queue_reply_all_error(struct ofono_dbus_queue *q,
static DBusMessage * __ofono_dbus_queue_reply_all_wrapper(DBusMessage *msg,
void *data)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
return ((ofono_dbus_reply_cb_t)data)(msg);
}
void __ofono_dbus_queue_reply_all_fn(struct ofono_dbus_queue *q,
ofono_dbus_reply_cb_t fn)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
__ofono_dbus_queue_reply_all_fn_param(q,
__ofono_dbus_queue_reply_all_wrapper,
fn ? fn : __ofono_error_failed);
@@ -238,6 +257,7 @@ void __ofono_dbus_queue_reply_all_fn(struct ofono_dbus_queue *q,
void __ofono_dbus_queue_reply_all_fn_param(struct ofono_dbus_queue *q,
ofono_dbus_cb_t fn, void *param)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
struct ofono_dbus_queue_request *prev, *req;
ofono_dbus_cb_t handler;
void *data;

View File

@@ -56,6 +56,7 @@ static const struct error_mapping_entry errno_errors_mapping[] = {
static void append_variant(DBusMessageIter *iter,
int type, const void *value)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
char sig[2];
DBusMessageIter valueiter;
@@ -73,6 +74,7 @@ static void append_variant(DBusMessageIter *iter,
void ofono_dbus_dict_append(DBusMessageIter *dict,
const char *key, int type, const void *value)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
DBusMessageIter keyiter;
if (type == DBUS_TYPE_STRING) {
@@ -94,6 +96,7 @@ void ofono_dbus_dict_append(DBusMessageIter *dict,
static void append_array_variant(DBusMessageIter *iter, int type,
const void *val)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
DBusMessageIter variant, array;
char typesig[2];
char arraysig[3];
@@ -122,6 +125,7 @@ static void append_array_variant(DBusMessageIter *iter, int type,
void ofono_dbus_dict_append_array(DBusMessageIter *dict, const char *key,
int type, const void *val)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
DBusMessageIter entry;
dbus_message_iter_open_container(dict, DBUS_TYPE_DICT_ENTRY,
@@ -137,6 +141,7 @@ void ofono_dbus_dict_append_array(DBusMessageIter *dict, const char *key,
static void append_dict_variant(DBusMessageIter *iter, int type,
const void *val)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
DBusMessageIter variant, array, entry;
char typesig[5];
char arraysig[6];
@@ -192,6 +197,7 @@ static void append_dict_variant(DBusMessageIter *iter, int type,
void ofono_dbus_dict_append_dict(DBusMessageIter *dict, const char *key,
int type, const void *val)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
DBusMessageIter entry;
dbus_message_iter_open_container(dict, DBUS_TYPE_DICT_ENTRY,
@@ -210,6 +216,7 @@ DBusMessage *ofono_dbus_signal_new_property_changed(const char *path,
const char *name,
int type, const void *value)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
DBusMessage *signal;
DBusMessageIter iter;
@@ -232,6 +239,7 @@ int ofono_dbus_signal_property_changed(DBusConnection *conn,
const char *name,
int type, const void *value)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
DBusMessage *signal = ofono_dbus_signal_new_property_changed(path,
interface, name, type, value);
@@ -251,6 +259,7 @@ int ofono_dbus_signal_array_property_changed(DBusConnection *conn,
int type, const void *value)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
DBusMessage *signal;
DBusMessageIter iter;
@@ -277,6 +286,7 @@ int ofono_dbus_signal_dict_property_changed(DBusConnection *conn,
int type, const void *value)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
DBusMessage *signal;
DBusMessageIter iter;
@@ -298,6 +308,7 @@ int ofono_dbus_signal_dict_property_changed(DBusConnection *conn,
DBusMessage *__ofono_error_invalid_args(DBusMessage *msg)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
return g_dbus_create_error(msg, OFONO_ERROR_INTERFACE
".InvalidArguments",
"Invalid arguments in method call");
@@ -305,6 +316,7 @@ DBusMessage *__ofono_error_invalid_args(DBusMessage *msg)
DBusMessage *__ofono_error_invalid_format(DBusMessage *msg)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
return g_dbus_create_error(msg, OFONO_ERROR_INTERFACE
".InvalidFormat",
"Argument format is not recognized");
@@ -312,6 +324,7 @@ DBusMessage *__ofono_error_invalid_format(DBusMessage *msg)
DBusMessage *__ofono_error_not_implemented(DBusMessage *msg)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
return g_dbus_create_error(msg, OFONO_ERROR_INTERFACE
".NotImplemented",
"Implementation not provided");
@@ -319,30 +332,35 @@ DBusMessage *__ofono_error_not_implemented(DBusMessage *msg)
DBusMessage *__ofono_error_failed(DBusMessage *msg)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
return g_dbus_create_error(msg, OFONO_ERROR_INTERFACE ".Failed",
"Operation failed");
}
DBusMessage *__ofono_error_busy(DBusMessage *msg)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
return g_dbus_create_error(msg, OFONO_ERROR_INTERFACE ".InProgress",
"Operation already in progress");
}
DBusMessage *__ofono_error_not_found(DBusMessage *msg)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
return g_dbus_create_error(msg, OFONO_ERROR_INTERFACE ".NotFound",
"Object is not found or not valid for this operation");
}
DBusMessage *__ofono_error_not_active(DBusMessage *msg)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
return g_dbus_create_error(msg, OFONO_ERROR_INTERFACE ".NotActive",
"Operation is not active or in progress");
}
DBusMessage *__ofono_error_not_supported(DBusMessage *msg)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
return g_dbus_create_error(msg, OFONO_ERROR_INTERFACE
".NotSupported",
"Operation is not supported by the"
@@ -351,6 +369,7 @@ DBusMessage *__ofono_error_not_supported(DBusMessage *msg)
DBusMessage *__ofono_error_not_available(DBusMessage *msg)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
return g_dbus_create_error(msg, OFONO_ERROR_INTERFACE
".NotAvailable",
"Operation currently not available");
@@ -358,30 +377,35 @@ DBusMessage *__ofono_error_not_available(DBusMessage *msg)
DBusMessage *__ofono_error_timed_out(DBusMessage *msg)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
return g_dbus_create_error(msg, OFONO_ERROR_INTERFACE ".Timedout",
"Operation failure due to timeout");
}
DBusMessage *__ofono_error_sim_not_ready(DBusMessage *msg)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
return g_dbus_create_error(msg, OFONO_ERROR_INTERFACE ".SimNotReady",
"SIM is not ready or not inserted");
}
DBusMessage *__ofono_error_in_use(DBusMessage *msg)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
return g_dbus_create_error(msg, OFONO_ERROR_INTERFACE ".InUse",
"The resource is currently in use");
}
DBusMessage *__ofono_error_not_attached(DBusMessage *msg)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
return g_dbus_create_error(msg, OFONO_ERROR_INTERFACE ".NotAttached",
"GPRS is not attached");
}
DBusMessage *__ofono_error_attach_in_progress(DBusMessage *msg)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
return g_dbus_create_error(msg,
OFONO_ERROR_INTERFACE ".AttachInProgress",
"GPRS Attach is in progress");
@@ -389,6 +413,7 @@ DBusMessage *__ofono_error_attach_in_progress(DBusMessage *msg)
DBusMessage *__ofono_error_not_registered(DBusMessage *msg)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
return g_dbus_create_error(msg,
OFONO_ERROR_INTERFACE ".NotRegistered",
"Modem is not registered to the network");
@@ -396,18 +421,21 @@ DBusMessage *__ofono_error_not_registered(DBusMessage *msg)
DBusMessage *__ofono_error_canceled(DBusMessage *msg)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
return g_dbus_create_error(msg, OFONO_ERROR_INTERFACE ".Canceled",
"Operation has been canceled");
}
DBusMessage *__ofono_error_access_denied(DBusMessage *msg)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
return g_dbus_create_error(msg, OFONO_ERROR_INTERFACE ".AccessDenied",
"Operation not permitted");
}
DBusMessage *__ofono_error_emergency_active(DBusMessage *msg)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
return g_dbus_create_error(msg,
OFONO_ERROR_INTERFACE ".EmergencyActive",
"Emergency mode active");
@@ -415,6 +443,7 @@ DBusMessage *__ofono_error_emergency_active(DBusMessage *msg)
DBusMessage *__ofono_error_incorrect_password(DBusMessage *msg)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
return g_dbus_create_error(msg,
OFONO_ERROR_INTERFACE ".IncorrectPassword",
"Password is incorrect");
@@ -422,18 +451,21 @@ DBusMessage *__ofono_error_incorrect_password(DBusMessage *msg)
DBusMessage *__ofono_error_not_allowed(DBusMessage *msg)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
return g_dbus_create_error(msg, OFONO_ERROR_INTERFACE ".NotAllowed",
"Operation is not allowed");
}
DBusMessage *__ofono_error_not_recognized(DBusMessage *msg)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
return g_dbus_create_error(msg, OFONO_ERROR_INTERFACE ".NotRecognized",
"String not recognized as USSD/SS");
}
DBusMessage *__ofono_error_network_terminated(DBusMessage *msg)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
return g_dbus_create_error(msg, OFONO_ERROR_INTERFACE
".Terminated",
"Operation was terminated by the"
@@ -443,6 +475,7 @@ DBusMessage *__ofono_error_network_terminated(DBusMessage *msg)
static DBusMessage *__ofono_map_error(const struct error_mapping_entry *map,
int error, DBusMessage *msg)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
const struct error_mapping_entry *e;
for (e = map; e->ofono_error_func; e++)
@@ -455,6 +488,7 @@ static DBusMessage *__ofono_map_error(const struct error_mapping_entry *map,
DBusMessage *__ofono_error_from_error(const struct ofono_error *error,
DBusMessage *msg)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
switch (error->type) {
case OFONO_ERROR_TYPE_CME:
return __ofono_map_error(cme_errors_mapping, error->error, msg);
@@ -474,6 +508,7 @@ DBusMessage *__ofono_error_from_error(const struct ofono_error *error,
void __ofono_dbus_pending_reply(DBusMessage **msg, DBusMessage *reply)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
DBusConnection *conn = ofono_dbus_get_connection();
g_dbus_send_message(conn, reply);
@@ -484,11 +519,13 @@ void __ofono_dbus_pending_reply(DBusMessage **msg, DBusMessage *reply)
DBusConnection *ofono_dbus_get_connection(void)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
return g_connection;
}
static void dbus_gsm_set_connection(DBusConnection *conn)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
if (conn && g_connection != NULL)
ofono_error("Setting a connection when it is not NULL");
@@ -497,6 +534,7 @@ static void dbus_gsm_set_connection(DBusConnection *conn)
int __ofono_dbus_init(DBusConnection *conn)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
dbus_gsm_set_connection(conn);
return 0;
@@ -504,6 +542,7 @@ int __ofono_dbus_init(DBusConnection *conn)
void __ofono_dbus_cleanup(void)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
DBusConnection *conn = ofono_dbus_get_connection();
if (conn == NULL || !dbus_connection_get_is_connected(conn))

View File

@@ -91,11 +91,13 @@ struct indicator {
static void emulator_debug(const char *str, void *data)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
ofono_info("%s: %s\n", (char *)data, str);
}
static void emulator_disconnect(gpointer user_data)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
struct ofono_emulator *em = user_data;
DBG("%p", em);
@@ -108,6 +110,7 @@ static void ppp_connect(const char *iface, const char *local,
const char *dns1, const char *dns2,
gpointer user_data)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
DBG("Network Device: %s\n", iface);
DBG("IP Address: %s\n", local);
DBG("Remote IP Address: %s\n", remote);
@@ -117,6 +120,7 @@ static void ppp_connect(const char *iface, const char *local,
static void cleanup_ppp(struct ofono_emulator *em)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
DBG("");
g_at_ppp_unref(em->ppp);
@@ -131,6 +135,7 @@ static void cleanup_ppp(struct ofono_emulator *em)
static void ppp_disconnect(GAtPPPDisconnectReason reason, gpointer user_data)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
struct ofono_emulator *em = user_data;
cleanup_ppp(em);
@@ -138,6 +143,7 @@ static void ppp_disconnect(GAtPPPDisconnectReason reason, gpointer user_data)
static void ppp_suspend(gpointer user_data)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
struct ofono_emulator *em = user_data;
DBG("");
@@ -147,6 +153,7 @@ static void ppp_suspend(gpointer user_data)
static void suspend_server(gpointer user_data)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
struct ofono_emulator *em = user_data;
GAtIO *io = g_at_server_get_io(em->server);
@@ -160,6 +167,7 @@ static void request_private_network_cb(
const struct ofono_private_network_settings *pns,
void *data)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
struct ofono_emulator *em = data;
GAtIO *io = g_at_server_get_io(em->server);
@@ -200,6 +208,7 @@ error:
static gboolean dial_call(struct ofono_emulator *em, const char *dial_str)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
char c = *dial_str;
DBG("dial call %s", dial_str);
@@ -216,6 +225,7 @@ static gboolean dial_call(struct ofono_emulator *em, const char *dial_str)
static void dial_cb(GAtServer *server, GAtServerRequestType type,
GAtResult *result, gpointer user_data)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
struct ofono_emulator *em = user_data;
GAtResultIter iter;
const char *dial_str;
@@ -249,6 +259,7 @@ error:
static void dun_ath_cb(GAtServer *server, GAtServerRequestType type,
GAtResult *result, gpointer user_data)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
struct ofono_emulator *em = user_data;
GAtResultIter iter;
int val;
@@ -290,6 +301,7 @@ error:
static void resume_ppp(gpointer user_data)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
struct ofono_emulator *em = user_data;
g_at_server_suspend(em->server);
@@ -299,6 +311,7 @@ static void resume_ppp(gpointer user_data)
static void dun_ato_cb(GAtServer *server, GAtServerRequestType type,
GAtResult *result, gpointer user_data)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
struct ofono_emulator *em = user_data;
GAtIO *io = g_at_server_get_io(em->server);
GAtResultIter iter;
@@ -336,6 +349,7 @@ error:
static struct indicator *find_indicator(struct ofono_emulator *em,
const char *name, int *index)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
GSList *l;
int i;
@@ -357,6 +371,7 @@ static struct indicator *find_indicator(struct ofono_emulator *em,
static struct ofono_call *find_call_with_status(struct ofono_emulator *em,
int status)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
struct ofono_modem *modem;
struct ofono_voicecall *vc = NULL;
GList *i;
@@ -376,6 +391,7 @@ static struct ofono_call *find_call_with_status(struct ofono_emulator *em,
static void notify_deferred_indicators(GAtServer *server, void *user_data)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
struct ofono_emulator *em = user_data;
int i;
char buf[20];
@@ -400,6 +416,7 @@ static void notify_deferred_indicators(GAtServer *server, void *user_data)
static gboolean notify_ccwa(void *user_data)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
struct ofono_emulator *em = user_data;
struct ofono_call *c;
const char *phone;
@@ -431,6 +448,7 @@ end:
static gboolean notify_ring(void *user_data)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
struct ofono_emulator *em = user_data;
struct ofono_call *c;
const char *phone;
@@ -474,6 +492,7 @@ static gboolean notify_ring(void *user_data)
static void brsf_cb(GAtServer *server, GAtServerRequestType type,
GAtResult *result, gpointer user_data)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
struct ofono_emulator *em = user_data;
GAtResultIter iter;
int val;
@@ -507,6 +526,7 @@ fail:
static void cind_cb(GAtServer *server, GAtServerRequestType type,
GAtResult *result, gpointer user_data)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
struct ofono_emulator *em = user_data;
GSList *l;
struct indicator *ind;
@@ -586,6 +606,7 @@ fail:
static void cmer_cb(GAtServer *server, GAtServerRequestType type,
GAtResult *result, gpointer user_data)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
struct ofono_emulator *em = user_data;
char buf[32];
@@ -685,6 +706,7 @@ fail:
static void clip_cb(GAtServer *server, GAtServerRequestType type,
GAtResult *result, gpointer user_data)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
struct ofono_emulator *em = user_data;
GAtResultIter iter;
int val;
@@ -721,6 +743,7 @@ fail:
static void ccwa_cb(GAtServer *server, GAtServerRequestType type,
GAtResult *result, gpointer user_data)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
struct ofono_emulator *em = user_data;
GAtResultIter iter;
int val;
@@ -768,6 +791,7 @@ fail:
static void cmee_cb(GAtServer *server, GAtServerRequestType type,
GAtResult *result, gpointer user_data)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
struct ofono_emulator *em = user_data;
GAtResultIter iter;
int val;
@@ -812,6 +836,7 @@ fail:
static void bia_cb(GAtServer *server, GAtServerRequestType type,
GAtResult *result, gpointer user_data)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
struct ofono_emulator *em = user_data;
switch (type) {
@@ -864,6 +889,7 @@ fail:
static void bind_cb(GAtServer *server, GAtServerRequestType type,
GAtResult *result, gpointer user_data)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
struct ofono_emulator *em = user_data;
char buf[128];
@@ -928,6 +954,7 @@ fail:
static void biev_cb(GAtServer *server, GAtServerRequestType type,
GAtResult *result, gpointer user_data)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
struct ofono_emulator *em = user_data;
switch (type) {
@@ -971,6 +998,7 @@ fail:
static void finish_codec_negotiation(struct ofono_emulator *em,
int err)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
if (em->codec_negotiation_cb == NULL)
return;
@@ -983,6 +1011,7 @@ static void finish_codec_negotiation(struct ofono_emulator *em,
static void bac_cb(GAtServer *server, GAtServerRequestType type,
GAtResult *result, gpointer user_data)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
struct ofono_emulator *em = user_data;
GAtResultIter iter;
int val;
@@ -1048,6 +1077,7 @@ fail:
static void connect_sco(struct ofono_emulator *em)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
int err;
DBG("");
@@ -1078,6 +1108,7 @@ static void connect_sco(struct ofono_emulator *em)
static void bcs_cb(GAtServer *server, GAtServerRequestType type,
GAtResult *result, gpointer user_data)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
struct ofono_emulator *em = user_data;
GAtResultIter iter;
int val;
@@ -1121,6 +1152,7 @@ static void bcs_cb(GAtServer *server, GAtServerRequestType type,
static void bcc_cb(GAtServer *server, GAtServerRequestType type,
GAtResult *result, gpointer user_data)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
struct ofono_emulator *em = user_data;
switch (type) {
@@ -1146,6 +1178,7 @@ static void emulator_add_indicator(struct ofono_emulator *em, const char* name,
int min, int max, int dflt,
gboolean mandatory)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
struct indicator *ind;
ind = g_try_new0(struct indicator, 1);
@@ -1166,6 +1199,7 @@ static void emulator_add_indicator(struct ofono_emulator *em, const char* name,
static void emulator_unregister(struct ofono_atom *atom)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
struct ofono_emulator *em = __ofono_atom_get_data(atom);
GSList *l;
@@ -1216,6 +1250,7 @@ static void emulator_unregister(struct ofono_atom *atom)
static void emulator_register_atom(struct ofono_emulator *em, struct ofono_atom *atom)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
if (!g_list_find(em->registered_atoms, atom)) {
em->registered_atoms = g_list_append(em->registered_atoms, atom);
DBG("%p", atom);
@@ -1225,6 +1260,7 @@ static void emulator_register_atom(struct ofono_emulator *em, struct ofono_atom
void ofono_emulator_register(struct ofono_emulator *em, int fd)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
GIOChannel *io;
GList *i;
@@ -1305,6 +1341,7 @@ void ofono_emulator_register(struct ofono_emulator *em, int fd)
static void emulator_free(struct ofono_emulator *em)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
g_assert(!em->atoms);
DBG("free emulator %p", em);
@@ -1315,6 +1352,7 @@ static void emulator_free(struct ofono_emulator *em)
static void emulator_remove(struct ofono_atom *atom)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
struct ofono_emulator *em = __ofono_atom_get_data(atom);
DBG("remove atom %p", atom);
@@ -1326,6 +1364,7 @@ static void emulator_remove(struct ofono_atom *atom)
struct ofono_emulator *ofono_emulator_create(enum ofono_emulator_type type)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
struct ofono_emulator *em;
if (type != OFONO_EMULATOR_TYPE_DUN && type != OFONO_EMULATOR_TYPE_HFP) {
@@ -1357,6 +1396,7 @@ struct ofono_emulator *ofono_emulator_create(enum ofono_emulator_type type)
void ofono_emulator_add_modem(struct ofono_emulator *em,
struct ofono_modem *modem)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
struct ofono_atom *atom;
enum ofono_atom_type atom_t;
@@ -1385,6 +1425,7 @@ register_atom:
void ofono_emulator_remove(struct ofono_emulator *em)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
GList *remove_list;
GList *i;
@@ -1409,6 +1450,7 @@ void ofono_emulator_remove(struct ofono_emulator *em)
void ofono_emulator_send_final(struct ofono_emulator *em,
const struct ofono_error *final)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
char buf[256];
/*
@@ -1456,18 +1498,21 @@ failure:
void ofono_emulator_send_unsolicited(struct ofono_emulator *em,
const char *result)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
g_at_server_send_unsolicited(em->server, result);
}
void ofono_emulator_send_intermediate(struct ofono_emulator *em,
const char *result)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
g_at_server_send_intermediate(em->server, result);
}
void ofono_emulator_send_info(struct ofono_emulator *em, const char *line,
ofono_bool_t last)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
g_at_server_send_info(em->server, line, last);
}
@@ -1486,6 +1531,7 @@ struct ofono_emulator_request {
static void handler_proxy(GAtServer *server, GAtServerRequestType type,
GAtResult *result, gpointer userdata)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
struct handler *h = userdata;
struct ofono_emulator_request req;
@@ -1513,6 +1559,7 @@ static void handler_proxy_need_slc(GAtServer *server,
GAtServerRequestType type,
GAtResult *result, gpointer userdata)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
struct handler *h = userdata;
if (h->em->slc == FALSE) {
@@ -1526,6 +1573,7 @@ static void handler_proxy_need_slc(GAtServer *server,
static void handler_proxy_chld(GAtServer *server, GAtServerRequestType type,
GAtResult *result, gpointer userdata)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
struct handler *h = userdata;
if (h->em->slc == FALSE && type != G_AT_SERVER_REQUEST_TYPE_SUPPORT) {
@@ -1538,6 +1586,7 @@ static void handler_proxy_chld(GAtServer *server, GAtServerRequestType type,
static void handler_destroy(gpointer userdata)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
struct handler *h = userdata;
if (h->destroy)
@@ -1551,6 +1600,7 @@ ofono_bool_t ofono_emulator_add_handler(struct ofono_emulator *em,
ofono_emulator_request_cb_t cb,
void *data, ofono_destroy_func destroy)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
struct handler *h;
GAtServerNotifyFunc func = handler_proxy;
@@ -1579,6 +1629,7 @@ ofono_bool_t ofono_emulator_add_handler(struct ofono_emulator *em,
ofono_bool_t ofono_emulator_remove_handler(struct ofono_emulator *em,
const char *prefix)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
return g_at_server_unregister(em->server, prefix);
}
@@ -1586,6 +1637,7 @@ ofono_bool_t ofono_emulator_request_next_string(
struct ofono_emulator_request *req,
const char **str)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
return g_at_result_iter_next_string(&req->iter, str);
}
@@ -1593,23 +1645,27 @@ ofono_bool_t ofono_emulator_request_next_number(
struct ofono_emulator_request *req,
int *number)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
return g_at_result_iter_next_number(&req->iter, number);
}
const char *ofono_emulator_request_get_raw(struct ofono_emulator_request *req)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
return g_at_result_iter_raw_line(&req->iter);
}
enum ofono_emulator_request_type ofono_emulator_request_get_type(
struct ofono_emulator_request *req)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
return req->type;
}
void ofono_emulator_set_indicator(struct ofono_emulator *em,
const char *name, int value)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
int i;
char buf[20];
struct indicator *ind;
@@ -1689,6 +1745,7 @@ start_ring:
void __ofono_emulator_set_indicator_forced(struct ofono_emulator *em,
const char *name, int value)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
int i;
struct indicator *ind;
char buf[20];
@@ -1712,6 +1769,7 @@ void __ofono_emulator_set_indicator_forced(struct ofono_emulator *em,
void __ofono_emulator_slc_condition(struct ofono_emulator *em,
enum ofono_emulator_slc_condition cond)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
if (em->slc == TRUE)
return;
@@ -1743,6 +1801,7 @@ void ofono_emulator_set_hf_indicator_active(struct ofono_emulator *em,
int indicator,
ofono_bool_t active)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
char buf[64];
if (!(em->l_features & HFP_HF_FEATURE_HF_INDICATORS))
@@ -1763,6 +1822,7 @@ void ofono_emulator_set_hf_indicator_active(struct ofono_emulator *em,
void ofono_emulator_set_handsfree_card(struct ofono_emulator *em,
struct ofono_handsfree_card *card)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
if (em == NULL)
return;
@@ -1771,6 +1831,7 @@ void ofono_emulator_set_handsfree_card(struct ofono_emulator *em,
static unsigned char select_codec(struct ofono_emulator *em)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
if (ofono_handsfree_audio_has_wideband() &&
em->r_codecs[MSBC_OFFSET].supported)
return HFP_CODEC_MSBC;
@@ -1782,6 +1843,7 @@ static unsigned char select_codec(struct ofono_emulator *em)
int ofono_emulator_start_codec_negotiation(struct ofono_emulator *em,
ofono_emulator_codec_negotiation_cb cb, void *data)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
char buf[64];
unsigned char codec;

View File

@@ -52,6 +52,7 @@ struct ofono_gnss {
static void gnss_unregister_agent_cb(const struct ofono_error *error,
void *data)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
DBusMessage *reply;
struct ofono_gnss *gnss = data;
@@ -71,6 +72,7 @@ static void gnss_unregister_agent_cb(const struct ofono_error *error,
static void gnss_disable_posr_cb(const struct ofono_error *error, void *data)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
struct ofono_gnss *gnss = data;
gnss->enabled = FALSE;
@@ -79,6 +81,7 @@ static void gnss_disable_posr_cb(const struct ofono_error *error, void *data)
static void gnss_register_agent_cb(const struct ofono_error *error,
void *data)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
DBusMessage *reply;
struct ofono_gnss *gnss = data;
@@ -108,6 +111,7 @@ static void gnss_register_agent_cb(const struct ofono_error *error,
static void gnss_agent_notify(gpointer user_data)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
struct ofono_gnss *gnss = user_data;
gnss->posr_agent = NULL;
@@ -121,6 +125,7 @@ static void gnss_agent_notify(gpointer user_data)
static DBusMessage *gnss_register_agent(DBusConnection *conn,
DBusMessage *msg, void *data)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
struct ofono_gnss *gnss = data;
const char *agent_path;
@@ -157,6 +162,7 @@ static DBusMessage *gnss_register_agent(DBusConnection *conn,
static DBusMessage *gnss_unregister_agent(DBusConnection *conn,
DBusMessage *msg, void *data)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
struct ofono_gnss *gnss = data;
const char *agent_path;
const char *agent_bus = dbus_message_get_sender(msg);
@@ -188,6 +194,7 @@ static DBusMessage *gnss_unregister_agent(DBusConnection *conn,
static void gnss_send_element_cb(const struct ofono_error *error,
void *data)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
DBusMessage *reply;
struct ofono_gnss *gnss = data;
@@ -205,6 +212,7 @@ static void gnss_send_element_cb(const struct ofono_error *error,
static DBusMessage *gnss_send_element(DBusConnection *conn,
DBusMessage *msg, void *data)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
const char *caller = dbus_message_get_sender(msg);
struct ofono_gnss *gnss = data;
const char *xml;
@@ -246,6 +254,7 @@ static const GDBusMethodTable gnss_methods[] = {
static void gnss_unregister(struct ofono_atom *atom)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
struct ofono_gnss *gnss = __ofono_atom_get_data(atom);
DBusConnection *conn = ofono_dbus_get_connection();
struct ofono_modem *modem = __ofono_atom_get_modem(atom);
@@ -260,6 +269,7 @@ static void gnss_unregister(struct ofono_atom *atom)
static void gnss_remove(struct ofono_atom *atom)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
struct ofono_gnss *gnss = __ofono_atom_get_data(atom);
DBG("atom: %p", atom);
@@ -275,6 +285,7 @@ static void gnss_remove(struct ofono_atom *atom)
void ofono_gnss_register(struct ofono_gnss *gnss)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
DBusConnection *conn = ofono_dbus_get_connection();
struct ofono_modem *modem = __ofono_atom_get_modem(gnss->atom);
const char *path = __ofono_atom_get_path(gnss->atom);
@@ -296,6 +307,7 @@ void ofono_gnss_register(struct ofono_gnss *gnss)
int ofono_gnss_driver_register(const struct ofono_gnss_driver *d)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
DBG("driver: %p, name: %s", d, d->name);
if (d->probe == NULL)
@@ -308,6 +320,7 @@ int ofono_gnss_driver_register(const struct ofono_gnss_driver *d)
void ofono_gnss_driver_unregister(const struct ofono_gnss_driver *d)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
DBG("driver: %p, name: %s", d, d->name);
g_drivers = g_slist_remove(g_drivers, (void *) d);
@@ -318,6 +331,7 @@ struct ofono_gnss *ofono_gnss_create(struct ofono_modem *modem,
const char *driver,
void *data)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
struct ofono_gnss *gnss;
GSList *l;
@@ -350,27 +364,32 @@ struct ofono_gnss *ofono_gnss_create(struct ofono_modem *modem,
void ofono_gnss_notify_posr_request(struct ofono_gnss *gnss, const char *xml)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
if (gnss->posr_agent)
gnss_agent_receive_request(gnss->posr_agent, xml);
}
void ofono_gnss_notify_posr_reset(struct ofono_gnss *gnss)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
if (gnss->posr_agent)
gnss_agent_receive_reset(gnss->posr_agent);
}
void ofono_gnss_remove(struct ofono_gnss *gnss)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
__ofono_atom_free(gnss->atom);
}
void ofono_gnss_set_data(struct ofono_gnss *gnss, void *data)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
gnss->driver_data = data;
}
void *ofono_gnss_get_data(struct ofono_gnss *gnss)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
return gnss->driver_data;
}

View File

@@ -45,6 +45,7 @@ struct gnss_agent {
static void gnss_agent_send_noreply(struct gnss_agent *agent,
const char *method, int type, ...)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
DBusConnection *conn = ofono_dbus_get_connection();
DBusMessage *message;
va_list args;
@@ -64,17 +65,20 @@ static void gnss_agent_send_noreply(struct gnss_agent *agent,
static inline void gnss_agent_send_release(struct gnss_agent *agent)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
gnss_agent_send_noreply(agent, "Release", DBUS_TYPE_INVALID);
}
void gnss_agent_receive_request(struct gnss_agent *agent, const char *xml)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
gnss_agent_send_noreply(agent, "Request", DBUS_TYPE_STRING, &xml,
DBUS_TYPE_INVALID);
}
void gnss_agent_receive_reset(struct gnss_agent *agent)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
gnss_agent_send_noreply(agent, "ResetAssistanceData",
DBUS_TYPE_INVALID);
}
@@ -82,6 +86,7 @@ void gnss_agent_receive_reset(struct gnss_agent *agent)
ofono_bool_t gnss_agent_matches(struct gnss_agent *agent,
const char *path, const char *sender)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
return g_str_equal(agent->path, path) &&
g_str_equal(agent->bus, sender);
}
@@ -89,6 +94,7 @@ ofono_bool_t gnss_agent_matches(struct gnss_agent *agent,
ofono_bool_t gnss_agent_sender_matches(struct gnss_agent *agent,
const char *sender)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
return g_str_equal(agent->bus, sender);
}
@@ -96,12 +102,14 @@ void gnss_agent_set_removed_notify(struct gnss_agent *agent,
ofono_destroy_func destroy,
void *user_data)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
agent->removed_cb = destroy;
agent->removed_data = user_data;
}
void gnss_agent_free(struct gnss_agent *agent)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
DBusConnection *conn = ofono_dbus_get_connection();
if (agent->disconnect_watch) {
@@ -120,6 +128,7 @@ void gnss_agent_free(struct gnss_agent *agent)
static void gnss_agent_disconnect_cb(DBusConnection *conn, void *user_data)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
struct gnss_agent *agent = user_data;
agent->disconnect_watch = 0;
@@ -129,6 +138,7 @@ static void gnss_agent_disconnect_cb(DBusConnection *conn, void *user_data)
struct gnss_agent *gnss_agent_new(const char *path, const char *sender)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
struct gnss_agent *agent = g_try_new0(struct gnss_agent, 1);
DBusConnection *conn = ofono_dbus_get_connection();

View File

@@ -63,6 +63,7 @@ static void gprs_filter_request_init(struct gprs_filter_request *req,
struct gprs_filter_chain *chain, struct ofono_gprs_context *gc,
ofono_destroy_func destroy, void *user_data)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
req->chain = chain;
req->fn = fn;
req->gc = gc;
@@ -81,6 +82,7 @@ static void gprs_filter_request_init(struct gprs_filter_request *req,
static void gprs_filter_request_cancel(struct gprs_filter_request *req)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
if (req->pending_id) {
const struct ofono_gprs_filter *f = req->filter_link->data;
@@ -99,6 +101,7 @@ static void gprs_filter_request_cancel(struct gprs_filter_request *req)
static void gprs_filter_request_dispose(struct gprs_filter_request *req)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
/* May be invoked several times per request */
if (req->destroy) {
ofono_destroy_func destroy = req->destroy;
@@ -110,6 +113,7 @@ static void gprs_filter_request_dispose(struct gprs_filter_request *req)
static void gprs_filter_request_free(struct gprs_filter_request *req)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
gprs_filter_request_dispose(req);
req->fn->free(req);
}
@@ -118,6 +122,7 @@ static void gprs_filter_request_free(struct gprs_filter_request *req)
static int gprs_filter_request_unref(struct gprs_filter_request *req)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
const int refcount = --(req->refcount);
if (!refcount) {
@@ -128,6 +133,7 @@ static int gprs_filter_request_unref(struct gprs_filter_request *req)
static void gprs_filter_request_free1(gpointer data)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
struct gprs_filter_request *req = data;
/*
@@ -142,6 +148,7 @@ static void gprs_filter_request_free1(gpointer data)
static void gprs_filter_request_dequeue(struct gprs_filter_request *req)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
struct gprs_filter_chain *chain = req->chain;
GSList *l;
@@ -159,6 +166,7 @@ static void gprs_filter_request_dequeue(struct gprs_filter_request *req)
static void gprs_filter_request_complete(struct gprs_filter_request *req,
gboolean allow)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
gprs_filter_request_ref(req);
req->fn->complete(req, allow);
gprs_filter_request_dispose(req);
@@ -168,6 +176,7 @@ static void gprs_filter_request_complete(struct gprs_filter_request *req,
static void gprs_filter_request_process(struct gprs_filter_request *req)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
GSList *l = req->filter_link;
const struct ofono_gprs_filter *f = l->data;
const struct gprs_filter_request_fn *fn = req->fn;
@@ -190,12 +199,14 @@ static void gprs_filter_request_process(struct gprs_filter_request *req)
static void gprs_filter_request_next(struct gprs_filter_request *req,
GSourceFunc fn)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
req->pending_id = 0;
req->next_id = g_idle_add(fn, req);
}
static gboolean gprs_filter_request_continue_cb(gpointer data)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
struct gprs_filter_request *req = data;
req->next_id = 0;
@@ -210,6 +221,7 @@ static gboolean gprs_filter_request_continue_cb(gpointer data)
static gboolean gprs_filter_request_disallow_cb(gpointer data)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
struct gprs_filter_request *req = data;
req->next_id = 0;
@@ -224,6 +236,7 @@ static gboolean gprs_filter_request_disallow_cb(gpointer data)
static void gprs_filter_copy_context(struct ofono_gprs_primary_context *dest,
const struct ofono_gprs_primary_context *src)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
dest->cid = src->cid;
dest->proto = src->proto;
dest->auth_method = src->auth_method;
@@ -238,18 +251,21 @@ static void gprs_filter_copy_context(struct ofono_gprs_primary_context *dest,
static struct gprs_filter_request_activate *gprs_filter_request_activate_cast
(struct gprs_filter_request *req)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
return (struct gprs_filter_request_activate *)req;
}
static gboolean gprs_filter_request_activate_can_process
(const struct ofono_gprs_filter *f)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
return f->filter_activate != NULL;
}
static void gprs_filter_request_activate_cb
(const struct ofono_gprs_primary_context *ctx, void *data)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
struct gprs_filter_request_activate *act = data;
struct gprs_filter_request *req = &act->req;
const struct ofono_gprs_filter *filter = req->filter_link->data;
@@ -270,6 +286,7 @@ static guint gprs_filter_request_activate_process
(const struct ofono_gprs_filter *f,
struct gprs_filter_request *req)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
struct gprs_filter_request_activate *act =
gprs_filter_request_activate_cast(req);
@@ -280,6 +297,7 @@ static guint gprs_filter_request_activate_process
static void gprs_filter_request_activate_complete
(struct gprs_filter_request *req, gboolean allow)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
struct gprs_filter_request_activate *act =
gprs_filter_request_activate_cast(req);
@@ -288,6 +306,7 @@ static void gprs_filter_request_activate_complete
static void gprs_filter_request_activate_free(struct gprs_filter_request *req)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
g_slice_free1(sizeof(struct gprs_filter_request_activate), req);
}
@@ -297,6 +316,7 @@ static struct gprs_filter_request *gprs_filter_request_activate_new
gprs_filter_activate_cb_t cb, ofono_destroy_func destroy,
void *data)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
static const struct gprs_filter_request_fn activate_fn = {
.name = "activate",
.can_process = gprs_filter_request_activate_can_process,
@@ -322,17 +342,20 @@ static struct gprs_filter_request *gprs_filter_request_activate_new
static struct gprs_filter_request_check *gprs_filter_request_check_cast
(struct gprs_filter_request *req)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
return (struct gprs_filter_request_check *)req;
}
static gboolean gprs_filter_request_check_can_process
(const struct ofono_gprs_filter *f)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
return f->api_version >= 1 && f->filter_check != NULL;
}
static void gprs_filter_request_check_cb(ofono_bool_t allow, void *data)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
struct gprs_filter_request_check *check = data;
struct gprs_filter_request *req = &check->req;
const struct ofono_gprs_filter *filter = req->filter_link->data;
@@ -349,6 +372,7 @@ static guint gprs_filter_request_check_process
(const struct ofono_gprs_filter *f,
struct gprs_filter_request *req)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
return f->filter_check(req->chain->gprs, gprs_filter_request_check_cb,
gprs_filter_request_check_cast(req));
}
@@ -356,11 +380,13 @@ static guint gprs_filter_request_check_process
static void gprs_filter_request_check_complete
(struct gprs_filter_request *req, gboolean allow)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
gprs_filter_request_check_cast(req)->cb(allow, req->user_data);
}
static void gprs_filter_request_check_free(struct gprs_filter_request *req)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
g_slice_free1(sizeof(struct gprs_filter_request_check), req);
}
@@ -368,6 +394,7 @@ static struct gprs_filter_request *gprs_filter_request_check_new
(struct gprs_filter_chain *chain, gprs_filter_check_cb_t cb,
ofono_destroy_func destroy, void *data)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
static const struct gprs_filter_request_fn check_fn = {
.name = "check",
.can_process = gprs_filter_request_check_can_process,
@@ -391,6 +418,7 @@ static struct gprs_filter_request *gprs_filter_request_check_new
struct gprs_filter_chain *__ofono_gprs_filter_chain_new(struct ofono_gprs *gp)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
struct gprs_filter_chain *chain = NULL;
if (gp) {
@@ -402,6 +430,7 @@ struct gprs_filter_chain *__ofono_gprs_filter_chain_new(struct ofono_gprs *gp)
void __ofono_gprs_filter_chain_free(struct gprs_filter_chain *chain)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
if (chain) {
__ofono_gprs_filter_chain_cancel(chain, NULL);
g_free(chain);
@@ -411,6 +440,7 @@ void __ofono_gprs_filter_chain_free(struct gprs_filter_chain *chain)
void __ofono_gprs_filter_chain_cancel(struct gprs_filter_chain *chain,
struct ofono_gprs_context *gc)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
if (chain) {
GSList *l, *canceled;
@@ -461,6 +491,7 @@ void __ofono_gprs_filter_chain_activate(struct gprs_filter_chain *chain,
gprs_filter_activate_cb_t cb, ofono_destroy_func destroy,
void *user_data)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
if (chain && gprs_filter_list && ctx && cb) {
gprs_filter_request_process
(gprs_filter_request_activate_new(chain, gc, ctx,
@@ -479,6 +510,7 @@ void __ofono_gprs_filter_chain_check(struct gprs_filter_chain *chain,
gprs_filter_check_cb_t cb, ofono_destroy_func destroy,
void *user_data)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
if (chain && gprs_filter_list && cb) {
gprs_filter_request_process
(gprs_filter_request_check_new(chain, cb, destroy,
@@ -504,6 +536,7 @@ void __ofono_gprs_filter_chain_check(struct gprs_filter_chain *chain,
*/
static gint gprs_filter_sort(gconstpointer a, gconstpointer b)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
const struct ofono_gprs_filter *a_filter = a;
const struct ofono_gprs_filter *b_filter = b;
@@ -521,6 +554,7 @@ static gint gprs_filter_sort(gconstpointer a, gconstpointer b)
int ofono_gprs_filter_register(const struct ofono_gprs_filter *filter)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
if (!filter || !filter->name) {
return -EINVAL;
}
@@ -533,6 +567,7 @@ int ofono_gprs_filter_register(const struct ofono_gprs_filter *filter)
void ofono_gprs_filter_unregister(const struct ofono_gprs_filter *filter)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
if (filter) {
DBG("%s", filter->name);
gprs_filter_list = g_slist_remove(gprs_filter_list, filter);

View File

@@ -36,6 +36,7 @@ void ofono_gprs_provision_free_settings(
struct ofono_gprs_provision_data *settings,
int count)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
int i;
for (i = 0; i < count; i++) {
@@ -56,6 +57,7 @@ ofono_bool_t ofono_gprs_provision_get_settings(const char *mcc,
struct ofono_gprs_provision_data **settings,
int *count)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
GSList *d;
if (mcc == NULL || strlen(mcc) == 0 || mnc == NULL || strlen(mnc) == 0)
@@ -80,6 +82,7 @@ ofono_bool_t ofono_gprs_provision_get_settings(const char *mcc,
static gint compare_priority(gconstpointer a, gconstpointer b)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
const struct ofono_gprs_provision_driver *plugin1 = a;
const struct ofono_gprs_provision_driver *plugin2 = b;
@@ -89,6 +92,7 @@ static gint compare_priority(gconstpointer a, gconstpointer b)
int ofono_gprs_provision_driver_register(
const struct ofono_gprs_provision_driver *driver)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
DBG("driver: %p name: %s", driver, driver->name);
g_drivers = g_slist_insert_sorted(g_drivers, (void *) driver,
@@ -99,6 +103,7 @@ int ofono_gprs_provision_driver_register(
void ofono_gprs_provision_driver_unregister(
const struct ofono_gprs_provision_driver *driver)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
DBG("driver: %p name: %s", driver, driver->name);
g_drivers = g_slist_remove(g_drivers, driver);

View File

@@ -161,6 +161,7 @@ static GSList *g_context_drivers = NULL;
const char *packet_bearer_to_string(int bearer)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
switch (bearer) {
case PACKET_BEARER_NONE:
return "none";
@@ -184,6 +185,7 @@ const char *packet_bearer_to_string(int bearer)
static const char *gprs_context_default_name(enum ofono_gprs_context_type type)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
switch (type) {
case OFONO_GPRS_CONTEXT_TYPE_ANY:
return NULL;
@@ -203,6 +205,7 @@ static const char *gprs_context_default_name(enum ofono_gprs_context_type type)
static const char *gprs_context_type_to_string(
enum ofono_gprs_context_type type)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
switch (type) {
case OFONO_GPRS_CONTEXT_TYPE_ANY:
return NULL;
@@ -222,6 +225,7 @@ static const char *gprs_context_type_to_string(
static gboolean gprs_context_string_to_type(const char *str,
enum ofono_gprs_context_type *out)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
if (g_str_equal(str, "internet")) {
*out = OFONO_GPRS_CONTEXT_TYPE_INTERNET;
return TRUE;
@@ -241,26 +245,31 @@ static gboolean gprs_context_string_to_type(const char *str,
static unsigned int gprs_cid_alloc(struct ofono_gprs *gprs)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
return idmap_alloc(gprs->cid_map);
}
static void gprs_cid_take(struct ofono_gprs *gprs, unsigned int id)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
idmap_take(gprs->cid_map, id);
}
static void gprs_cid_release(struct ofono_gprs *gprs, unsigned int id)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
idmap_put(gprs->cid_map, id);
}
static gboolean gprs_cid_taken(struct ofono_gprs *gprs, unsigned int id)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
return idmap_find(gprs->cid_map, id) != 0;
}
static gboolean assign_context(struct pri_context *ctx, int use_cid)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
struct idmap *cidmap = ctx->gprs->cid_map;
GSList *l;
@@ -312,6 +321,7 @@ static gboolean assign_context(struct pri_context *ctx, int use_cid)
static void release_context(struct pri_context *ctx)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
if (ctx == NULL || ctx->gprs == NULL || ctx->context_driver == NULL)
return;
@@ -328,6 +338,7 @@ static void release_context(struct pri_context *ctx)
static struct pri_context *gprs_context_by_path(struct ofono_gprs *gprs,
const char *ctx_path)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
GSList *l;
for (l = gprs->contexts; l; l = l->next) {
@@ -342,6 +353,7 @@ static struct pri_context *gprs_context_by_path(struct ofono_gprs *gprs,
static void context_settings_free(struct context_settings *settings)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
if (settings->ipv4) {
g_free(settings->ipv4->ip);
g_free(settings->ipv4->netmask);
@@ -369,6 +381,7 @@ static void context_settings_append_ipv4(struct context_settings *settings,
const char *interface,
DBusMessageIter *iter)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
DBusMessageIter variant;
DBusMessageIter array;
char typesig[5];
@@ -436,6 +449,7 @@ static void context_settings_append_ipv4_dict(struct context_settings *settings,
const char *interface,
DBusMessageIter *dict)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
DBusMessageIter entry;
const char *key = "Settings";
@@ -453,6 +467,7 @@ static void context_settings_append_ipv6(struct context_settings *settings,
const char *interface,
DBusMessageIter *iter)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
DBusMessageIter variant;
DBusMessageIter array;
char typesig[5];
@@ -508,6 +523,7 @@ static void context_settings_append_ipv6_dict(struct context_settings *settings,
const char *interface,
DBusMessageIter *dict)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
DBusMessageIter entry;
const char *key = "IPv6.Settings";
@@ -526,6 +542,7 @@ static void signal_settings(struct pri_context *ctx, const char *prop,
const char *, DBusMessageIter *))
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
DBusConnection *conn = ofono_dbus_get_connection();
const char *path = ctx->path;
DBusMessage *signal;
@@ -558,6 +575,7 @@ static void signal_settings(struct pri_context *ctx, const char *prop,
static void pri_context_signal_settings(struct pri_context *ctx,
gboolean ipv4, gboolean ipv6)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
if (ipv4)
signal_settings(ctx, "Settings",
context_settings_append_ipv4);
@@ -569,6 +587,7 @@ static void pri_context_signal_settings(struct pri_context *ctx,
static gboolean pri_parse_proxy(struct pri_context *ctx, const char *proxy)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
char *scheme, *host, *port, *path;
if (proxy[0] == 0)
@@ -666,6 +685,7 @@ static gboolean pri_parse_proxy(struct pri_context *ctx, const char *proxy)
static void pri_ifupdown(const char *interface, ofono_bool_t active)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
struct ifreq ifr;
int sk;
@@ -701,6 +721,7 @@ done:
static void pri_set_ipv4_addr(const char *interface, const char *address)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
struct ifreq ifr;
struct sockaddr_in addr;
int sk;
@@ -745,6 +766,7 @@ done:
static void pri_setproxy(const char *interface, const char *proxy)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
struct rtentry rt;
struct sockaddr_in addr;
in_addr_t proxy_addr;
@@ -788,6 +810,7 @@ static void pri_setproxy(const char *interface, const char *proxy)
static void pri_reset_context_settings(struct pri_context *ctx)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
struct context_settings *settings;
const char *interface;
gboolean signal_ipv4;
@@ -820,6 +843,7 @@ static void pri_reset_context_settings(struct pri_context *ctx)
static void pri_update_mms_context_settings(struct pri_context *ctx)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
struct ofono_gprs_context *gc = ctx->context_driver;
struct context_settings *settings = gc->settings;
@@ -840,12 +864,14 @@ static void pri_update_mms_context_settings(struct pri_context *ctx)
static gboolean pri_str_changed(const char *val, const char *newval)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
return newval ? (strcmp(val, newval) != 0) : (val[0] != 0);
}
static gboolean pri_str_update(char *val, const char *newval,
const int maxlen)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
if (newval) {
if (strcmp(val, newval)) {
strncpy(val, newval, maxlen);
@@ -863,6 +889,7 @@ static gboolean pri_str_update(char *val, const char *newval,
static void pri_str_signal_change(struct pri_context *ctx,
const char *name, const char *value)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
ofono_dbus_signal_property_changed(ofono_dbus_get_connection(),
ctx->path, OFONO_CONNECTION_CONTEXT_INTERFACE,
name, DBUS_TYPE_STRING, &value);
@@ -870,6 +897,7 @@ static void pri_str_signal_change(struct pri_context *ctx,
static void pri_settings_changed(struct pri_context *ctx)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
const char *path = __ofono_atom_get_path(ctx->gprs->atom);
__ofono_watch_gprs_settings_changed(path, ctx->type, &ctx->context);
@@ -878,6 +906,7 @@ static void pri_settings_changed(struct pri_context *ctx)
static void pri_reset_context_properties(struct pri_context *ctx,
const struct ofono_gprs_provision_data *ap)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
struct ofono_gprs *gprs = ctx->gprs;
gboolean changed = FALSE;
@@ -950,6 +979,7 @@ static void pri_reset_context_properties(struct pri_context *ctx,
static gboolean ap_valid(const struct ofono_gprs_provision_data *ap)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
if (!ap->apn || strlen(ap->apn) > OFONO_GPRS_MAX_APN_LENGTH ||
!is_valid_apn(ap->apn))
return FALSE;
@@ -976,6 +1006,7 @@ static gboolean ap_valid(const struct ofono_gprs_provision_data *ap)
static gboolean pri_deactivation_required(struct pri_context *ctx,
const struct ofono_gprs_provision_data *ap)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
if (ctx->context.proto != ap->proto)
return TRUE;
@@ -1003,6 +1034,7 @@ static gboolean pri_deactivation_required(struct pri_context *ctx,
static gboolean connctx_allow(DBusMessage *msg,
enum ofono_dbus_access_connctx_method method, const char *arg)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
return ofono_dbus_access_method_allowed(dbus_message_get_sender(msg),
OFONO_DBUS_ACCESS_INTF_CONNCTX, method, arg);
}
@@ -1010,6 +1042,7 @@ static gboolean connctx_allow(DBusMessage *msg,
static DBusMessage *pri_provision_context(DBusConnection *conn,
DBusMessage *msg, void *data)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
DBG("");
struct pri_context *ctx = data;
struct ofono_gprs *gprs = ctx->gprs;
@@ -1058,6 +1091,7 @@ static DBusMessage *pri_provision_context(DBusConnection *conn,
static void append_context_properties(struct pri_context *ctx,
DBusMessageIter *dict)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
const char *type = gprs_context_type_to_string(ctx->type);
const char *proto = gprs_proto_to_string(ctx->context.proto);
const char *name = ctx->name;
@@ -1120,6 +1154,7 @@ static void append_context_properties(struct pri_context *ctx,
static DBusMessage *pri_get_properties(DBusConnection *conn,
DBusMessage *msg, void *data)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
struct pri_context *ctx = data;
DBusMessage *reply;
DBusMessageIter iter;
@@ -1142,6 +1177,7 @@ static DBusMessage *pri_get_properties(DBusConnection *conn,
static void pri_activate_callback(const struct ofono_error *error, void *data)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
struct pri_context *ctx = data;
struct ofono_gprs_context *gc = ctx->context_driver;
DBusConnection *conn = ofono_dbus_get_connection();
@@ -1183,6 +1219,7 @@ static void pri_activate_callback(const struct ofono_error *error, void *data)
static void pri_deactivate_callback(const struct ofono_error *error, void *data)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
struct pri_context *ctx = data;
DBusConnection *conn = ofono_dbus_get_connection();
dbus_bool_t value;
@@ -1223,6 +1260,7 @@ static DBusMessage *pri_set_preferred(struct pri_context *ctx,
DBusConnection *conn,
DBusMessage *msg, gboolean preferred)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
GKeyFile *settings = ctx->gprs->settings;
if (ctx->preferred == preferred)
@@ -1249,6 +1287,7 @@ static DBusMessage *pri_set_preferred(struct pri_context *ctx,
static void gprs_set_attached_property(struct ofono_gprs *gprs,
ofono_bool_t attached)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
const char *path;
DBusConnection *conn = ofono_dbus_get_connection();
dbus_bool_t value = attached;
@@ -1267,6 +1306,7 @@ static void gprs_set_attached_property(struct ofono_gprs *gprs,
static void pri_read_settings_callback(const struct ofono_error *error,
void *data)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
struct pri_context *pri_ctx = data;
struct ofono_gprs_context *gc = pri_ctx->context_driver;
struct ofono_gprs *gprs = pri_ctx->gprs;
@@ -1312,6 +1352,7 @@ static void pri_read_settings_callback(const struct ofono_error *error,
static DBusMessage *pri_set_apn(struct pri_context *ctx, DBusConnection *conn,
DBusMessage *msg, const char *apn)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
GKeyFile *settings = ctx->gprs->settings;
if (g_str_equal(apn, ctx->context.apn))
@@ -1344,6 +1385,7 @@ static DBusMessage *pri_set_username(struct pri_context *ctx,
DBusConnection *conn, DBusMessage *msg,
const char *username)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
GKeyFile *settings = ctx->gprs->settings;
if (strlen(username) > OFONO_GPRS_MAX_USERNAME_LENGTH)
@@ -1375,6 +1417,7 @@ static DBusMessage *pri_set_password(struct pri_context *ctx,
DBusConnection *conn, DBusMessage *msg,
const char *password)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
GKeyFile *settings = ctx->gprs->settings;
if (strlen(password) > OFONO_GPRS_MAX_PASSWORD_LENGTH)
@@ -1405,6 +1448,7 @@ static DBusMessage *pri_set_password(struct pri_context *ctx,
static DBusMessage *pri_set_type(struct pri_context *ctx, DBusConnection *conn,
DBusMessage *msg, const char *type)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
GKeyFile *settings = ctx->gprs->settings;
enum ofono_gprs_context_type context_type;
@@ -1435,6 +1479,7 @@ static DBusMessage *pri_set_proto(struct pri_context *ctx,
DBusConnection *conn,
DBusMessage *msg, const char *str)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
GKeyFile *settings = ctx->gprs->settings;
enum ofono_gprs_proto proto;
@@ -1464,6 +1509,7 @@ static DBusMessage *pri_set_proto(struct pri_context *ctx,
static DBusMessage *pri_set_name(struct pri_context *ctx, DBusConnection *conn,
DBusMessage *msg, const char *name)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
GKeyFile *settings = ctx->gprs->settings;
if (strlen(name) > MAX_CONTEXT_NAME_LENGTH)
@@ -1492,6 +1538,7 @@ static DBusMessage *pri_set_message_proxy(struct pri_context *ctx,
DBusConnection *conn,
DBusMessage *msg, const char *proxy)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
GKeyFile *settings = ctx->gprs->settings;
if (strlen(proxy) > MAX_MESSAGE_PROXY_LENGTH)
@@ -1521,6 +1568,7 @@ static DBusMessage *pri_set_message_center(struct pri_context *ctx,
DBusConnection *conn,
DBusMessage *msg, const char *center)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
GKeyFile *settings = ctx->gprs->settings;
if (strlen(center) > MAX_MESSAGE_CENTER_LENGTH)
@@ -1550,6 +1598,7 @@ static DBusMessage *pri_set_auth_method(struct pri_context *ctx,
DBusConnection *conn,
DBusMessage *msg, const char *str)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
GKeyFile *settings = ctx->gprs->settings;
enum ofono_gprs_auth_method auth;
@@ -1585,6 +1634,7 @@ struct pri_request_data {
static struct pri_request_data *pri_request_new(struct pri_context *pri)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
struct pri_request_data *data = g_new0(struct pri_request_data, 1);
data->pri = pri;
@@ -1594,6 +1644,7 @@ static struct pri_request_data *pri_request_new(struct pri_context *pri)
static void pri_request_free(void *user_data)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
struct pri_request_data *data = user_data;
struct pri_context *pri = data->pri;
@@ -1608,6 +1659,7 @@ static void pri_request_free(void *user_data)
static void pri_activate_filt(const struct ofono_gprs_primary_context *ctx,
void *user_data)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
struct pri_request_data *data = user_data;
struct pri_context *pri = data->pri;
@@ -1626,6 +1678,7 @@ static void pri_activate_filt(const struct ofono_gprs_primary_context *ctx,
static DBusMessage *pri_set_property(DBusConnection *conn,
DBusMessage *msg, void *data)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
struct pri_context *ctx = data;
DBusMessageIter iter;
DBusMessageIter var;
@@ -1803,6 +1856,7 @@ static struct pri_context *pri_context_create(struct ofono_gprs *gprs,
const char *name,
enum ofono_gprs_context_type type)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
struct pri_context *context = g_try_new0(struct pri_context, 1);
if (context == NULL)
@@ -1825,6 +1879,7 @@ static struct pri_context *pri_context_create(struct ofono_gprs *gprs,
static void pri_context_destroy(gpointer userdata)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
struct pri_context *ctx = userdata;
g_free(ctx->proxy_host);
@@ -1834,6 +1889,7 @@ static void pri_context_destroy(gpointer userdata)
static gboolean context_dbus_register(struct pri_context *ctx)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
DBusConnection *conn = ofono_dbus_get_connection();
char path[256];
const char *basepath;
@@ -1861,6 +1917,7 @@ static gboolean context_dbus_register(struct pri_context *ctx)
static gboolean context_dbus_unregister(struct pri_context *ctx)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
DBusConnection *conn = ofono_dbus_get_connection();
char path[256];
@@ -1884,6 +1941,7 @@ static gboolean context_dbus_unregister(struct pri_context *ctx)
static void update_suspended_property(struct ofono_gprs *gprs,
ofono_bool_t suspended)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
DBusConnection *conn = ofono_dbus_get_connection();
const char *path = __ofono_atom_get_path(gprs->atom);
dbus_bool_t value = suspended;
@@ -1909,6 +1967,7 @@ static void update_suspended_property(struct ofono_gprs *gprs,
static gboolean suspend_timeout(gpointer data)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
struct ofono_gprs *gprs = data;
gprs->suspend_timeout = 0;
@@ -1918,6 +1977,7 @@ static gboolean suspend_timeout(gpointer data)
void ofono_gprs_suspend_notify(struct ofono_gprs *gprs, int cause)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
switch (cause) {
case GPRS_SUSPENDED_DETACHED:
case GPRS_SUSPENDED_CALL:
@@ -1938,11 +1998,13 @@ void ofono_gprs_suspend_notify(struct ofono_gprs *gprs, int cause)
void ofono_gprs_resume_notify(struct ofono_gprs *gprs)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
update_suspended_property(gprs, FALSE);
}
static gboolean have_active_contexts(struct ofono_gprs *gprs)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
GSList *l;
struct pri_context *ctx;
@@ -1959,6 +2021,7 @@ static gboolean have_active_contexts(struct ofono_gprs *gprs)
#ifdef SAILFISH_OS
static bool have_read_settings(struct ofono_gprs *gprs)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
GSList *l;
for (l = gprs->context_drivers; l; l = l->next) {
@@ -1974,6 +2037,7 @@ static bool have_read_settings(struct ofono_gprs *gprs)
static void pri_context_signal_active(struct pri_context *ctx)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
DBusConnection *conn;
dbus_bool_t value;
@@ -1987,6 +2051,7 @@ static void pri_context_signal_active(struct pri_context *ctx)
static void release_active_contexts(struct ofono_gprs *gprs)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
GSList *l;
struct pri_context *ctx;
@@ -2016,6 +2081,7 @@ static void release_active_contexts(struct ofono_gprs *gprs)
static void gprs_set_attached(struct ofono_gprs *gprs, ofono_bool_t attached)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
if (attached == gprs->attached)
return;
@@ -2044,11 +2110,13 @@ static void gprs_set_attached(struct ofono_gprs *gprs, ofono_bool_t attached)
static void gprs_attached_check_cb(ofono_bool_t allow, void *user_data)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
gprs_set_attached((struct ofono_gprs *)user_data, allow);
}
void gprs_attached_update(struct ofono_gprs *gprs)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
ofono_bool_t attached = gprs->driver_attached &&
(gprs->status == NETWORK_REGISTRATION_STATUS_REGISTERED ||
gprs->status == NETWORK_REGISTRATION_STATUS_ROAMING);
@@ -2071,6 +2139,7 @@ void gprs_attached_update(struct ofono_gprs *gprs)
static void registration_status_cb(const struct ofono_error *error,
int status, void *data)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
struct ofono_gprs *gprs = data;
DBG("%s error %d status %d", __ofono_atom_get_path(gprs->atom),
@@ -2091,6 +2160,7 @@ static void registration_status_cb(const struct ofono_error *error,
static void gprs_attach_callback(const struct ofono_error *error, void *data)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
struct ofono_gprs *gprs = data;
DBG("%s error = %d", __ofono_atom_get_path(gprs->atom), error->type);
@@ -2113,6 +2183,7 @@ static void gprs_attach_callback(const struct ofono_error *error, void *data)
static void gprs_netreg_removed(struct ofono_gprs *gprs)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
gprs->netreg = NULL;
gprs->flags &= ~(GPRS_FLAG_RECHECK | GPRS_FLAG_ATTACHING);
@@ -2125,6 +2196,7 @@ static void gprs_netreg_removed(struct ofono_gprs *gprs)
static void gprs_netreg_update(struct ofono_gprs *gprs)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
ofono_bool_t attach;
attach = gprs->netreg_status == NETWORK_REGISTRATION_STATUS_REGISTERED;
@@ -2169,6 +2241,7 @@ static void netreg_status_changed(int status, int lac, int ci, int tech,
const char *mcc, const char *mnc,
void *data)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
struct ofono_gprs *gprs = data;
DBG("%d", status);
@@ -2181,6 +2254,7 @@ static void netreg_status_changed(int status, int lac, int ci, int tech,
static DBusMessage *gprs_get_properties(DBusConnection *conn,
DBusMessage *msg, void *data)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
struct ofono_gprs *gprs = data;
DBusMessage *reply;
DBusMessageIter iter;
@@ -2228,6 +2302,7 @@ static DBusMessage *gprs_get_properties(DBusConnection *conn,
static gboolean gprs_allow(DBusMessage *msg,
enum ofono_dbus_access_connmgr_method method, const char *arg)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
return ofono_dbus_access_method_allowed(dbus_message_get_sender(msg),
OFONO_DBUS_ACCESS_INTF_CONNMGR, method, arg);
}
@@ -2235,6 +2310,7 @@ static gboolean gprs_allow(DBusMessage *msg,
static DBusMessage *gprs_set_property(DBusConnection *conn,
DBusMessage *msg, void *data)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
struct ofono_gprs *gprs = data;
DBusMessageIter iter;
DBusMessageIter var;
@@ -2319,6 +2395,7 @@ static DBusMessage *gprs_set_property(DBusConnection *conn,
static void write_context_settings(struct ofono_gprs *gprs,
struct pri_context *context)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
const char *auth_method;
g_key_file_set_string(gprs->settings, context->key,
@@ -2355,6 +2432,7 @@ static void write_context_settings(struct ofono_gprs *gprs,
static struct pri_context *find_usable_context(struct ofono_gprs *gprs,
const char *apn)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
GSList *l;
struct pri_context *pri_ctx;
@@ -2385,6 +2463,7 @@ static struct pri_context *add_context(struct ofono_gprs *gprs,
const char *name,
enum ofono_gprs_context_type type)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
unsigned int id;
struct pri_context *context;
@@ -2427,6 +2506,7 @@ static struct pri_context *add_context(struct ofono_gprs *gprs,
void ofono_gprs_cid_activated(struct ofono_gprs *gprs, unsigned int cid,
const char *apn)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
struct pri_context *pri_ctx;
struct ofono_gprs_context *gc;
@@ -2501,6 +2581,7 @@ static void send_context_added_signal(struct ofono_gprs *gprs,
struct pri_context *context,
DBusConnection *conn)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
const char *path;
DBusMessage *signal;
DBusMessageIter iter;
@@ -2530,6 +2611,7 @@ static void send_context_added_signal(struct ofono_gprs *gprs,
static DBusMessage *gprs_add_context(DBusConnection *conn,
DBusMessage *msg, void *data)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
struct ofono_gprs *gprs = data;
struct pri_context *context;
const char *typestr;
@@ -2570,6 +2652,7 @@ static DBusMessage *gprs_add_context(DBusConnection *conn,
static void gprs_deactivate_for_remove(const struct ofono_error *error,
void *data)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
struct pri_context *ctx = data;
struct ofono_gprs *gprs = ctx->gprs;
DBusConnection *conn = ofono_dbus_get_connection();
@@ -2618,6 +2701,7 @@ static void gprs_deactivate_for_remove(const struct ofono_error *error,
static DBusMessage *gprs_remove_context(DBusConnection *conn,
DBusMessage *msg, void *data)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
struct ofono_gprs *gprs = data;
struct pri_context *ctx;
const char *path;
@@ -2677,6 +2761,7 @@ static DBusMessage *gprs_remove_context(DBusConnection *conn,
static void gprs_deactivate_for_all(const struct ofono_error *error,
void *data)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
struct pri_context *ctx = data;
struct ofono_gprs *gprs = ctx->gprs;
@@ -2695,6 +2780,7 @@ static void gprs_deactivate_for_all(const struct ofono_error *error,
static void gprs_deactivate_next(struct ofono_gprs *gprs)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
GSList *l;
struct pri_context *ctx;
struct ofono_gprs_context *gc;
@@ -2719,6 +2805,7 @@ static void gprs_deactivate_next(struct ofono_gprs *gprs)
static DBusMessage *gprs_deactivate_all(DBusConnection *conn,
DBusMessage *msg, void *data)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
struct ofono_gprs *gprs = data;
GSList *l;
struct pri_context *ctx;
@@ -2749,6 +2836,7 @@ static DBusMessage *gprs_deactivate_all(DBusConnection *conn,
static DBusMessage *gprs_get_contexts(DBusConnection *conn,
DBusMessage *msg, void *data)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
struct ofono_gprs *gprs = data;
DBusMessage *reply;
DBusMessageIter iter;
@@ -2801,6 +2889,7 @@ static DBusMessage *gprs_get_contexts(DBusConnection *conn,
static void provision_context(const struct ofono_gprs_provision_data *ap,
struct ofono_gprs *gprs)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
unsigned int id;
struct pri_context *context = NULL;
@@ -2883,6 +2972,7 @@ static void provision_context(const struct ofono_gprs_provision_data *ap,
static void provision_contexts(struct ofono_gprs *gprs, const char *mcc,
const char *mnc, const char *spn)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
struct ofono_gprs_provision_data *settings;
int count;
int i;
@@ -2906,6 +2996,7 @@ static void provision_contexts(struct ofono_gprs *gprs, const char *mcc,
static gboolean all_contexts_configured(struct ofono_gprs *gprs)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
GSList *l;
for (l = gprs->context_drivers; l; l = l->next) {
@@ -2922,6 +3013,7 @@ static gboolean all_contexts_configured(struct ofono_gprs *gprs)
static void configure_remaining_contexts(struct ofono_gprs *gprs)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
GSList *l;
for (l = gprs->context_drivers; l; l = l->next) {
@@ -2959,6 +3051,7 @@ static void configure_remaining_contexts(struct ofono_gprs *gprs)
static void remove_non_active_context(struct ofono_gprs *gprs,
struct pri_context *ctx, DBusConnection *conn)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
char *path;
const char *atompath;
@@ -2983,6 +3076,7 @@ static void remove_non_active_context(struct ofono_gprs *gprs,
static DBusMessage *gprs_reset_contexts(DBusConnection *conn,
DBusMessage *msg, void *data)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
struct ofono_gprs *gprs = data;
struct ofono_modem *modem = __ofono_atom_get_modem(gprs->atom);
struct ofono_sim *sim = __ofono_atom_find(OFONO_ATOM_TYPE_SIM, modem);
@@ -3081,6 +3175,7 @@ static const GDBusSignalTable manager_signals[] = {
void ofono_gprs_detached_notify(struct ofono_gprs *gprs)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
DBG("%s", __ofono_atom_get_path(gprs->atom));
gprs->driver_attached = FALSE;
@@ -3095,6 +3190,7 @@ void ofono_gprs_detached_notify(struct ofono_gprs *gprs)
void ofono_gprs_status_notify(struct ofono_gprs *gprs, int status)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
DBG("%s status %s (%d)", __ofono_atom_get_path(gprs->atom),
registration_status_to_string(status), status);
@@ -3135,6 +3231,7 @@ detach:
void ofono_gprs_set_cid_range(struct ofono_gprs *gprs,
unsigned int min, unsigned int max)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
if (gprs == NULL)
return;
@@ -3146,6 +3243,7 @@ void ofono_gprs_set_cid_range(struct ofono_gprs *gprs,
static void gprs_context_unregister(struct ofono_atom *atom)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
struct ofono_gprs_context *gc = __ofono_atom_get_data(atom);
DBusConnection *conn = ofono_dbus_get_connection();
GSList *l;
@@ -3199,6 +3297,7 @@ done:
void ofono_gprs_add_context(struct ofono_gprs *gprs,
struct ofono_gprs_context *gc)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
if (gc->driver == NULL)
return;
@@ -3211,6 +3310,7 @@ void ofono_gprs_add_context(struct ofono_gprs *gprs,
void ofono_gprs_bearer_notify(struct ofono_gprs *gprs, int bearer)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
DBusConnection *conn = ofono_dbus_get_connection();
const char *path;
const char *value;
@@ -3229,6 +3329,7 @@ void ofono_gprs_bearer_notify(struct ofono_gprs *gprs, int bearer)
void ofono_gprs_context_deactivated(struct ofono_gprs_context *gc,
unsigned int cid)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
DBusConnection *conn = ofono_dbus_get_connection();
GSList *l;
struct pri_context *ctx;
@@ -3269,6 +3370,7 @@ void ofono_gprs_context_deactivated(struct ofono_gprs_context *gc,
int ofono_gprs_context_driver_register(
const struct ofono_gprs_context_driver *d)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
DBG("driver: %p, name: %s", d, d->name);
if (d->probe == NULL)
@@ -3282,6 +3384,7 @@ int ofono_gprs_context_driver_register(
void ofono_gprs_context_driver_unregister(
const struct ofono_gprs_context_driver *d)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
DBG("driver: %p, name: %s", d, d->name);
g_context_drivers = g_slist_remove(g_context_drivers, (void *) d);
@@ -3289,6 +3392,7 @@ void ofono_gprs_context_driver_unregister(
static void gprs_context_remove(struct ofono_atom *atom)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
struct ofono_gprs_context *gc = __ofono_atom_get_data(atom);
DBG("atom: %p", atom);
@@ -3309,6 +3413,7 @@ struct ofono_gprs_context *ofono_gprs_context_create(struct ofono_modem *modem,
unsigned int vendor,
const char *driver, void *data)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
struct ofono_gprs_context *gc;
GSList *l;
@@ -3342,6 +3447,7 @@ struct ofono_gprs_context *ofono_gprs_context_create(struct ofono_modem *modem,
void ofono_gprs_context_remove(struct ofono_gprs_context *gc)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
if (gc == NULL)
return;
@@ -3350,22 +3456,26 @@ void ofono_gprs_context_remove(struct ofono_gprs_context *gc)
void ofono_gprs_context_set_data(struct ofono_gprs_context *gc, void *data)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
gc->driver_data = data;
}
void *ofono_gprs_context_get_data(struct ofono_gprs_context *gc)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
return gc->driver_data;
}
struct ofono_modem *ofono_gprs_context_get_modem(struct ofono_gprs_context *gc)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
return __ofono_atom_get_modem(gc->atom);
}
void ofono_gprs_context_set_type(struct ofono_gprs_context *gc,
enum ofono_gprs_context_type type)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
DBG("type %d", type);
gc->type = type;
@@ -3374,17 +3484,20 @@ void ofono_gprs_context_set_type(struct ofono_gprs_context *gc,
enum ofono_gprs_context_type ofono_gprs_context_get_type(
struct ofono_gprs_context *gc)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
return gc->type;
}
const char *ofono_gprs_context_get_interface(struct ofono_gprs_context *gc)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
return gc->interface;
}
void ofono_gprs_context_set_interface(struct ofono_gprs_context *gc,
const char *interface)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
g_free(gc->interface);
gc->interface = g_strdup(interface);
}
@@ -3393,6 +3506,7 @@ void ofono_gprs_context_set_ipv4_address(struct ofono_gprs_context *gc,
const char *address,
ofono_bool_t static_ip)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
struct context_settings *settings = gc->settings;
if (settings->ipv4 == NULL)
@@ -3406,6 +3520,7 @@ void ofono_gprs_context_set_ipv4_address(struct ofono_gprs_context *gc,
void ofono_gprs_context_set_ipv4_netmask(struct ofono_gprs_context *gc,
const char *netmask)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
struct context_settings *settings = gc->settings;
if (settings->ipv4 == NULL)
@@ -3418,6 +3533,7 @@ void ofono_gprs_context_set_ipv4_netmask(struct ofono_gprs_context *gc,
void ofono_gprs_context_set_ipv4_prefix_length(struct ofono_gprs_context *gc,
unsigned int length)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
struct context_settings *settings = gc->settings;
struct in_addr ipv4;
char buf[INET_ADDRSTRLEN];
@@ -3439,6 +3555,7 @@ void ofono_gprs_context_set_ipv4_prefix_length(struct ofono_gprs_context *gc,
void ofono_gprs_context_set_ipv4_gateway(struct ofono_gprs_context *gc,
const char *gateway)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
struct context_settings *settings = gc->settings;
if (settings->ipv4 == NULL)
@@ -3451,6 +3568,7 @@ void ofono_gprs_context_set_ipv4_gateway(struct ofono_gprs_context *gc,
void ofono_gprs_context_set_ipv4_dns_servers(struct ofono_gprs_context *gc,
const char **dns)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
struct context_settings *settings = gc->settings;
if (settings->ipv4 == NULL)
@@ -3463,6 +3581,7 @@ void ofono_gprs_context_set_ipv4_dns_servers(struct ofono_gprs_context *gc,
void ofono_gprs_context_set_ipv4_proxy_cscf(struct ofono_gprs_context *gc,
const char **pcscf)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
struct context_settings *settings = gc->settings;
if (settings->ipv4 == NULL)
@@ -3475,6 +3594,7 @@ void ofono_gprs_context_set_ipv4_proxy_cscf(struct ofono_gprs_context *gc,
void ofono_gprs_context_set_ipv6_address(struct ofono_gprs_context *gc,
const char *address)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
struct context_settings *settings = gc->settings;
if (settings->ipv6 == NULL)
@@ -3487,6 +3607,7 @@ void ofono_gprs_context_set_ipv6_address(struct ofono_gprs_context *gc,
void ofono_gprs_context_set_ipv6_prefix_length(struct ofono_gprs_context *gc,
unsigned char length)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
struct context_settings *settings = gc->settings;
if (settings->ipv6 == NULL)
@@ -3498,6 +3619,7 @@ void ofono_gprs_context_set_ipv6_prefix_length(struct ofono_gprs_context *gc,
void ofono_gprs_context_set_ipv6_gateway(struct ofono_gprs_context *gc,
const char *gateway)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
struct context_settings *settings = gc->settings;
if (settings->ipv6 == NULL)
@@ -3510,6 +3632,7 @@ void ofono_gprs_context_set_ipv6_gateway(struct ofono_gprs_context *gc,
void ofono_gprs_context_set_ipv6_dns_servers(struct ofono_gprs_context *gc,
const char **dns)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
struct context_settings *settings = gc->settings;
if (settings->ipv6 == NULL)
@@ -3522,6 +3645,7 @@ void ofono_gprs_context_set_ipv6_dns_servers(struct ofono_gprs_context *gc,
void ofono_gprs_context_set_ipv6_proxy_cscf(struct ofono_gprs_context *gc,
const char **pcscf)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
struct context_settings *settings = gc->settings;
if (settings->ipv6 == NULL)
@@ -3534,6 +3658,7 @@ void ofono_gprs_context_set_ipv6_proxy_cscf(struct ofono_gprs_context *gc,
void ofono_gprs_context_signal_change(struct ofono_gprs_context *gc,
unsigned int cid)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
GSList *l;
struct pri_context *ctx;
@@ -3556,6 +3681,7 @@ void ofono_gprs_context_signal_change(struct ofono_gprs_context *gc,
int ofono_gprs_driver_register(const struct ofono_gprs_driver *d)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
DBG("driver: %p, name: %s", d, d->name);
if (d->probe == NULL)
@@ -3568,6 +3694,7 @@ int ofono_gprs_driver_register(const struct ofono_gprs_driver *d)
void ofono_gprs_driver_unregister(const struct ofono_gprs_driver *d)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
DBG("driver: %p, name: %s", d, d->name);
g_drivers = g_slist_remove(g_drivers, (void *)d);
@@ -3575,6 +3702,7 @@ void ofono_gprs_driver_unregister(const struct ofono_gprs_driver *d)
static void free_contexts(struct ofono_gprs *gprs)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
GSList *l;
if (gprs->settings) {
@@ -3597,6 +3725,7 @@ static void free_contexts(struct ofono_gprs *gprs)
static void gprs_unregister(struct ofono_atom *atom)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
DBusConnection *conn = ofono_dbus_get_connection();
struct ofono_gprs *gprs = __ofono_atom_get_data(atom);
struct ofono_modem *modem = __ofono_atom_get_modem(atom);
@@ -3638,6 +3767,7 @@ static void gprs_unregister(struct ofono_atom *atom)
static void gprs_remove(struct ofono_atom *atom)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
struct ofono_gprs *gprs = __ofono_atom_get_data(atom);
GSList *l;
@@ -3673,6 +3803,7 @@ struct ofono_gprs *ofono_gprs_create(struct ofono_modem *modem,
unsigned int vendor,
const char *driver, void *data)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
struct ofono_gprs *gprs;
GSList *l;
@@ -3711,6 +3842,7 @@ static void netreg_watch(struct ofono_atom *atom,
enum ofono_atom_watch_condition cond,
void *data)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
struct ofono_gprs *gprs = data;
if (cond == OFONO_ATOM_WATCH_CONDITION_UNREGISTERED) {
@@ -3728,6 +3860,7 @@ static void netreg_watch(struct ofono_atom *atom,
static gboolean load_context(struct ofono_gprs *gprs, const char *group)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
char *name = NULL;
char *typestr = NULL;
char *protostr = NULL;
@@ -3872,6 +4005,7 @@ error:
static void gprs_load_settings(struct ofono_gprs *gprs, const char *imsi)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
GError *error;
gboolean legacy = FALSE;
char **groups;
@@ -3942,6 +4076,7 @@ remove:
static void ofono_gprs_finish_register(struct ofono_gprs *gprs)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
DBusConnection *conn = ofono_dbus_get_connection();
struct ofono_modem *modem = __ofono_atom_get_modem(gprs->atom);
const char *path = __ofono_atom_get_path(gprs->atom);
@@ -3971,6 +4106,7 @@ static void ofono_gprs_finish_register(struct ofono_gprs *gprs)
static void spn_read_cb(const char *spn, const char *dc, void *data)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
struct ofono_gprs *gprs = data;
struct ofono_modem *modem = __ofono_atom_get_modem(gprs->atom);
struct ofono_sim *sim = __ofono_atom_find(OFONO_ATOM_TYPE_SIM, modem);
@@ -3985,11 +4121,13 @@ static void spn_read_cb(const char *spn, const char *dc, void *data)
struct ofono_modem *ofono_gprs_get_modem(struct ofono_gprs *gprs)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
return __ofono_atom_get_modem(gprs->atom);
}
void ofono_gprs_register(struct ofono_gprs *gprs)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
struct ofono_modem *modem = __ofono_atom_get_modem(gprs->atom);
struct ofono_sim *sim = __ofono_atom_find(OFONO_ATOM_TYPE_SIM, modem);
@@ -4010,27 +4148,32 @@ finish:
void ofono_gprs_remove(struct ofono_gprs *gprs)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
__ofono_atom_free(gprs->atom);
}
void ofono_gprs_set_data(struct ofono_gprs *gprs, void *data)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
gprs->driver_data = data;
}
void *ofono_gprs_get_data(struct ofono_gprs *gprs)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
return gprs->driver_data;
}
ofono_bool_t ofono_gprs_get_roaming_allowed(struct ofono_gprs *gprs)
{ /* Since mer/1.24+git2 */
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
return gprs->roaming_allowed;
}
const struct ofono_gprs_primary_context *ofono_gprs_context_settings_by_type
(struct ofono_gprs *gprs, enum ofono_gprs_context_type type)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
GSList *l;
if (!gprs)
@@ -4049,6 +4192,7 @@ const struct ofono_gprs_primary_context *ofono_gprs_context_settings_by_type
enum ofono_gprs_context_type ofono_gprs_context_get_assigned_type(
struct ofono_gprs_context *gc) /* Since mer/1.24+git2 */
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
if (gc) {
struct ofono_gprs *gprs = gc->gprs;
GSList *l;

View File

@@ -72,6 +72,7 @@ static ofono_bool_t transparent_sco = FALSE;
static const char *card_type_to_string(enum ofono_handsfree_card_type type)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
switch (type) {
case OFONO_HANDSFREE_CARD_TYPE_HANDSFREE:
return "handsfree";
@@ -83,6 +84,7 @@ static const char *card_type_to_string(enum ofono_handsfree_card_type type)
static uint16_t codec2setting(uint8_t codec)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
switch (codec) {
case HFP_CODEC_CVSD:
return BT_VOICE_CVSD_16BIT;
@@ -93,6 +95,7 @@ static uint16_t codec2setting(uint8_t codec)
static ofono_bool_t apply_settings_from_codec(int fd, uint8_t codec)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
struct bt_voice voice;
memset(&voice, 0, sizeof(voice));
@@ -110,6 +113,7 @@ static ofono_bool_t apply_settings_from_codec(int fd, uint8_t codec)
static void send_new_connection(const char *card, int fd, uint8_t codec)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
DBusMessage *msg;
DBusMessageIter iter;
@@ -131,6 +135,7 @@ static void send_new_connection(const char *card, int fd, uint8_t codec)
static struct ofono_handsfree_card *card_find(const char *remote,
const char *local)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
GSList *list;
for (list = card_list; list; list = g_slist_next(list)) {
@@ -147,6 +152,7 @@ static struct ofono_handsfree_card *card_find(const char *remote,
static gboolean sco_accept(GIOChannel *io, GIOCondition cond,
gpointer user_data)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
struct ofono_handsfree_card *card;
struct sockaddr_sco saddr;
socklen_t alen;
@@ -211,6 +217,7 @@ static gboolean sco_accept(GIOChannel *io, GIOCondition cond,
static int sco_init(void)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
GIOChannel *sco_io;
struct sockaddr_sco saddr;
struct bt_voice voice;
@@ -267,6 +274,7 @@ static int sco_init(void)
static void card_append_properties(struct ofono_handsfree_card *card,
DBusMessageIter *dict)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
const char *type;
type = card_type_to_string(card->type);
@@ -283,6 +291,7 @@ static void card_append_properties(struct ofono_handsfree_card *card,
static DBusMessage *card_get_properties(DBusConnection *conn,
DBusMessage *msg, void *data)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
struct ofono_handsfree_card *card = data;
DBusMessage *reply;
DBusMessageIter iter;
@@ -308,6 +317,7 @@ static gboolean sco_connect_cb(GIOChannel *io, GIOCondition cond,
gpointer user_data)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
struct ofono_handsfree_card *card = user_data;
DBusMessage *reply;
int sk;
@@ -355,6 +365,7 @@ done:
static void card_connect_reply_cb(const struct ofono_error *error, void *data)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
struct ofono_handsfree_card *card = data;
DBusMessage *reply;
@@ -369,6 +380,7 @@ static void card_connect_reply_cb(const struct ofono_error *error, void *data)
static DBusMessage *card_connect(DBusConnection *conn,
DBusMessage *msg, void *data)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
struct ofono_handsfree_card *card = data;
const struct ofono_handsfree_card_driver *driver = card->driver;
const char *sender;
@@ -427,6 +439,7 @@ struct ofono_handsfree_card *ofono_handsfree_card_create(unsigned int vendor,
const char *driver,
void *data)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
struct ofono_handsfree_card *card;
GSList *l;
@@ -456,17 +469,20 @@ struct ofono_handsfree_card *ofono_handsfree_card_create(unsigned int vendor,
void ofono_handsfree_card_set_data(struct ofono_handsfree_card *card,
void *data)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
card->driver_data = data;
}
void *ofono_handsfree_card_get_data(struct ofono_handsfree_card *card)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
return card->driver_data;
}
void ofono_handsfree_card_set_remote(struct ofono_handsfree_card *card,
const char *remote)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
if (card->remote)
g_free(card->remote);
@@ -475,12 +491,14 @@ void ofono_handsfree_card_set_remote(struct ofono_handsfree_card *card,
const char *ofono_handsfree_card_get_remote(struct ofono_handsfree_card *card)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
return card->remote;
}
void ofono_handsfree_card_set_local(struct ofono_handsfree_card *card,
const char *local)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
if (card->local)
g_free(card->local);
@@ -489,11 +507,13 @@ void ofono_handsfree_card_set_local(struct ofono_handsfree_card *card,
const char *ofono_handsfree_card_get_local(struct ofono_handsfree_card *card)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
return card->local;
}
int ofono_handsfree_card_connect_sco(struct ofono_handsfree_card *card)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
GIOChannel *io;
struct sockaddr_sco addr;
int sk, ret;
@@ -540,6 +560,7 @@ int ofono_handsfree_card_connect_sco(struct ofono_handsfree_card *card)
static void emit_card_added(struct ofono_handsfree_card *card)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
DBusMessage *signal;
DBusMessageIter iter;
DBusMessageIter dict;
@@ -567,6 +588,7 @@ static void emit_card_added(struct ofono_handsfree_card *card)
int ofono_handsfree_card_register(struct ofono_handsfree_card *card)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
static int next_card_id = 1;
char path[64];
@@ -591,6 +613,7 @@ int ofono_handsfree_card_register(struct ofono_handsfree_card *card)
static void emit_card_removed(struct ofono_handsfree_card *card)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
DBusConnection *conn = ofono_dbus_get_connection();
const char *path = card->path;
@@ -602,6 +625,7 @@ static void emit_card_removed(struct ofono_handsfree_card *card)
static void card_unregister(struct ofono_handsfree_card *card)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
DBusConnection *conn = ofono_dbus_get_connection();
g_dbus_unregister_interface(conn, card->path, HFP_AUDIO_CARD_INTERFACE);
@@ -614,6 +638,7 @@ static void card_unregister(struct ofono_handsfree_card *card)
void ofono_handsfree_card_remove(struct ofono_handsfree_card *card)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
DBG("%p", card);
if (card == NULL)
@@ -636,6 +661,7 @@ void ofono_handsfree_card_remove(struct ofono_handsfree_card *card)
ofono_bool_t ofono_handsfree_card_set_codec(struct ofono_handsfree_card *card,
unsigned char codec)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
if (codec == HFP_CODEC_CVSD)
goto done;
@@ -652,16 +678,19 @@ done:
ofono_bool_t ofono_handsfree_audio_has_wideband(void)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
return has_wideband;
}
ofono_bool_t ofono_handsfree_audio_has_transparent_sco(void)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
return transparent_sco;
}
static void agent_free(struct agent *agent)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
if (agent->watch > 0)
g_dbus_remove_watch(ofono_dbus_get_connection(), agent->watch);
@@ -672,6 +701,7 @@ static void agent_free(struct agent *agent)
static void agent_release(struct agent *agent)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
DBusMessage *msg;
msg = dbus_message_new_method_call(agent->owner, agent->path,
@@ -682,6 +712,7 @@ static void agent_release(struct agent *agent)
static void agent_disconnect(DBusConnection *conn, void *user_data)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
DBG("Agent %s disconnected", agent->owner);
agent_free(agent);
@@ -692,6 +723,7 @@ static void agent_disconnect(DBusConnection *conn, void *user_data)
static void append_card(void *data, void *userdata)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
struct ofono_handsfree_card *card = data;
struct DBusMessageIter *array = userdata;
DBusMessageIter entry, dict;
@@ -713,6 +745,7 @@ static void append_card(void *data, void *userdata)
static DBusMessage *am_get_cards(DBusConnection *conn,
DBusMessage *msg, void *user_data)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
DBusMessage *reply;
DBusMessageIter iter;
DBusMessageIter array;
@@ -742,6 +775,7 @@ static DBusMessage *am_get_cards(DBusConnection *conn,
static DBusMessage *am_agent_register(DBusConnection *conn,
DBusMessage *msg, void *user_data)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
const char *sender, *path;
unsigned char *codecs;
DBusMessageIter iter, array;
@@ -802,6 +836,7 @@ static DBusMessage *am_agent_register(DBusConnection *conn,
static DBusMessage *am_agent_unregister(DBusConnection *conn,
DBusMessage *msg, void *user_data)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
const char *sender, *path;
DBusMessageIter iter;
@@ -855,6 +890,7 @@ static const GDBusSignalTable am_signals[] = {
int ofono_handsfree_card_driver_register(
const struct ofono_handsfree_card_driver *d)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
DBG("driver: %p", d);
if (defer_setup == 0)
@@ -871,6 +907,7 @@ int ofono_handsfree_card_driver_register(
void ofono_handsfree_card_driver_unregister(
const struct ofono_handsfree_card_driver *d)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
DBG("driver: %p", d);
drivers = g_slist_remove(drivers, (void *) d);
@@ -878,6 +915,7 @@ void ofono_handsfree_card_driver_unregister(
void ofono_handsfree_audio_ref(void)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
ref_count += 1;
if (ref_count != 1)
@@ -895,6 +933,7 @@ void ofono_handsfree_audio_ref(void)
void ofono_handsfree_audio_unref(void)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
if (ref_count == 0) {
ofono_error("Error in handsfree audio manager ref counting");
return;
@@ -920,11 +959,13 @@ void ofono_handsfree_audio_unref(void)
int __ofono_handsfree_audio_manager_init(void)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
return sco_init();
}
void __ofono_handsfree_audio_manager_cleanup(void)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
if (ref_count != 0)
return;

View File

@@ -71,6 +71,7 @@ struct ofono_handsfree {
static const char **ag_features_list(unsigned int features,
unsigned int chld_features)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
/*
* BRSF response is a 32-bit unsigned int. Only 32 entries are posible,
* and we do not ever report the presence of bit 8.
@@ -116,6 +117,7 @@ static const char **ag_features_list(unsigned int features,
void ofono_handsfree_set_inband_ringing(struct ofono_handsfree *hf,
ofono_bool_t enabled)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
DBusConnection *conn = ofono_dbus_get_connection();
const char *path = __ofono_atom_get_path(hf->atom);
dbus_bool_t dbus_enabled = enabled;
@@ -137,6 +139,7 @@ void ofono_handsfree_set_inband_ringing(struct ofono_handsfree *hf,
void ofono_handsfree_voice_recognition_notify(struct ofono_handsfree *hf,
ofono_bool_t enabled)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
DBusConnection *conn = ofono_dbus_get_connection();
const char *path = __ofono_atom_get_path(hf->atom);
dbus_bool_t dbus_enabled = enabled;
@@ -155,6 +158,7 @@ void ofono_handsfree_voice_recognition_notify(struct ofono_handsfree *hf,
void ofono_handsfree_set_ag_features(struct ofono_handsfree *hf,
unsigned int ag_features)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
if (hf == NULL)
return;
@@ -164,6 +168,7 @@ void ofono_handsfree_set_ag_features(struct ofono_handsfree *hf,
void ofono_handsfree_set_ag_chld_features(struct ofono_handsfree *hf,
unsigned int ag_chld_features)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
if (hf == NULL)
return;
@@ -173,6 +178,7 @@ void ofono_handsfree_set_ag_chld_features(struct ofono_handsfree *hf,
void ofono_handsfree_battchg_notify(struct ofono_handsfree *hf,
unsigned char level)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
DBusConnection *conn = ofono_dbus_get_connection();
const char *path = __ofono_atom_get_path(hf->atom);
@@ -196,6 +202,7 @@ void ofono_handsfree_battchg_notify(struct ofono_handsfree *hf,
static void append_subscriber_numbers(GSList *subscriber_numbers,
DBusMessageIter *iter)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
DBusMessageIter entry;
DBusMessageIter variant, array;
GSList *l;
@@ -231,6 +238,7 @@ static void append_subscriber_numbers(GSList *subscriber_numbers,
static DBusMessage *generate_get_properties_reply(struct ofono_handsfree *hf,
DBusMessage *msg)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
DBusMessage *reply;
DBusMessageIter iter;
DBusMessageIter dict;
@@ -283,6 +291,7 @@ static void hf_cnum_callback(const struct ofono_error *error, int total,
const struct ofono_phone_number *numbers,
void *data)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
struct ofono_handsfree *hf = data;
int num;
struct ofono_phone_number *subscriber_number;
@@ -315,6 +324,7 @@ out:
static void query_cnum(struct ofono_handsfree *hf)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
DBusMessage *reply;
if (hf->driver->cnum_query != NULL) {
@@ -332,6 +342,7 @@ static void query_cnum(struct ofono_handsfree *hf)
static DBusMessage *handsfree_get_properties(DBusConnection *conn,
DBusMessage *msg, void *data)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
struct ofono_handsfree *hf = data;
if (hf->pending != NULL)
@@ -350,6 +361,7 @@ static DBusMessage *handsfree_get_properties(DBusConnection *conn,
static void voicerec_set_cb(const struct ofono_error *error, void *data)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
struct ofono_handsfree *hf = data;
DBusConnection *conn = ofono_dbus_get_connection();
const char *path = __ofono_atom_get_path(hf->atom);
@@ -374,6 +386,7 @@ static void voicerec_set_cb(const struct ofono_error *error, void *data)
static void ddr_set_cb(const struct ofono_error *error, void *data)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
struct ofono_handsfree *hf = data;
DBusConnection *conn = ofono_dbus_get_connection();
const char *path = __ofono_atom_get_path(hf->atom);
@@ -400,6 +413,7 @@ void ofono_handsfree_set_hf_indicators(struct ofono_handsfree *hf,
const unsigned short *indicators,
unsigned int num)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
unsigned int i;
for (i = 0; i < num; i++) {
@@ -413,6 +427,7 @@ void ofono_handsfree_set_hf_indicators(struct ofono_handsfree *hf,
static void ddr_update_cb(const struct ofono_error *error, void *data)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
if (error->type == OFONO_ERROR_TYPE_NO_ERROR)
return;
@@ -423,6 +438,7 @@ void ofono_handsfree_hf_indicator_active_notify(struct ofono_handsfree *hf,
unsigned int indicator,
ofono_bool_t active)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
DBG("%d, %d", indicator, active);
if (active)
@@ -450,6 +466,7 @@ void ofono_handsfree_hf_indicator_active_notify(struct ofono_handsfree *hf,
static void nrec_set_cb(const struct ofono_error *error, void *data)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
struct ofono_handsfree *hf = data;
DBusConnection *conn = ofono_dbus_get_connection();
const char *path = __ofono_atom_get_path(hf->atom);
@@ -475,6 +492,7 @@ static void nrec_set_cb(const struct ofono_error *error, void *data)
static DBusMessage *handsfree_set_property(DBusConnection *conn,
DBusMessage *msg, void *data)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
struct ofono_handsfree *hf = data;
DBusMessageIter iter, var;
ofono_bool_t enabled;
@@ -567,6 +585,7 @@ static void request_phone_number_cb(const struct ofono_error *error,
const struct ofono_phone_number *number,
void *data)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
struct ofono_handsfree *hf = data;
DBusMessage *reply;
const char *phone_number;
@@ -590,6 +609,7 @@ static void request_phone_number_cb(const struct ofono_error *error,
static DBusMessage *handsfree_request_phone_number(DBusConnection *conn,
DBusMessage *msg, void *data)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
struct ofono_handsfree *hf = data;
if (hf->pending)
@@ -625,6 +645,7 @@ static const GDBusSignalTable handsfree_signals[] = {
static void handsfree_remove(struct ofono_atom *atom)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
struct ofono_handsfree *hf = __ofono_atom_get_data(atom);
DBG("atom: %p", atom);
@@ -643,6 +664,7 @@ struct ofono_handsfree *ofono_handsfree_create(struct ofono_modem *modem,
const char *driver,
void *data)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
struct ofono_handsfree *hf;
GSList *l;
@@ -676,6 +698,7 @@ struct ofono_handsfree *ofono_handsfree_create(struct ofono_modem *modem,
static void handsfree_unregister(struct ofono_atom *atom)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
DBusConnection *conn = ofono_dbus_get_connection();
struct ofono_modem *modem = __ofono_atom_get_modem(atom);
const char *path = __ofono_atom_get_path(atom);
@@ -696,6 +719,7 @@ static void handsfree_unregister(struct ofono_atom *atom)
void ofono_handsfree_register(struct ofono_handsfree *hf)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
DBusConnection *conn = ofono_dbus_get_connection();
struct ofono_modem *modem = __ofono_atom_get_modem(hf->atom);
const char *path = __ofono_atom_get_path(hf->atom);
@@ -717,6 +741,7 @@ void ofono_handsfree_register(struct ofono_handsfree *hf)
int ofono_handsfree_driver_register(const struct ofono_handsfree_driver *d)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
DBG("driver: %p, name: %s", d, d->name);
if (d->probe == NULL)
@@ -730,6 +755,7 @@ int ofono_handsfree_driver_register(const struct ofono_handsfree_driver *d)
void ofono_handsfree_driver_unregister(
const struct ofono_handsfree_driver *d)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
DBG("driver: %p, name: %s", d, d->name);
g_drivers = g_slist_remove(g_drivers, (void *) d);
@@ -737,15 +763,18 @@ void ofono_handsfree_driver_unregister(
void ofono_handsfree_remove(struct ofono_handsfree *hf)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
__ofono_atom_free(hf->atom);
}
void ofono_handsfree_set_data(struct ofono_handsfree *hf, void *data)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
hf->driver_data = data;
}
void *ofono_handsfree_get_data(struct ofono_handsfree *hf)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
return hf->driver_data;
}

View File

@@ -64,6 +64,7 @@ static struct ofono_history_context *history_context_create(
struct ofono_modem *modem,
struct ofono_history_driver *driver)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
struct ofono_history_context *context;
if (driver->probe == NULL)
@@ -87,6 +88,7 @@ static struct ofono_history_context *history_context_create(
static void context_remove(struct ofono_atom *atom)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
struct ofono_history_context *context = __ofono_atom_get_data(atom);
if (context->driver->remove)
@@ -97,6 +99,7 @@ static void context_remove(struct ofono_atom *atom)
void __ofono_history_probe_drivers(struct ofono_modem *modem)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
struct ofono_history_driver *driver;
struct ofono_history_context *context;
GSList *l;
@@ -115,6 +118,7 @@ void __ofono_history_probe_drivers(struct ofono_modem *modem)
static void history_call_ended(struct ofono_atom *atom, void *data)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
struct ofono_history_context *context = __ofono_atom_get_data(atom);
struct history_call_foreach_data *hfd = data;
@@ -128,6 +132,7 @@ void __ofono_history_call_ended(struct ofono_modem *modem,
const struct ofono_call *call,
time_t start, time_t end)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
struct history_call_foreach_data hfd;
hfd.call = call;
@@ -140,6 +145,7 @@ void __ofono_history_call_ended(struct ofono_modem *modem,
static void history_call_missed(struct ofono_atom *atom, void *data)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
struct ofono_history_context *context = __ofono_atom_get_data(atom);
struct history_call_foreach_data *hfd = data;
@@ -152,6 +158,7 @@ static void history_call_missed(struct ofono_atom *atom, void *data)
void __ofono_history_call_missed(struct ofono_modem *modem,
const struct ofono_call *call, time_t when)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
struct history_call_foreach_data hfd;
hfd.call = call;
@@ -163,6 +170,7 @@ void __ofono_history_call_missed(struct ofono_modem *modem,
static void history_sms_received(struct ofono_atom *atom, void *data)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
struct ofono_history_context *context = __ofono_atom_get_data(atom);
struct history_sms_foreach_data *hfd = data;
@@ -180,6 +188,7 @@ void __ofono_history_sms_received(struct ofono_modem *modem,
const struct tm *local,
const char *text)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
struct history_sms_foreach_data hfd;
hfd.uuid = uuid;
@@ -194,6 +203,7 @@ void __ofono_history_sms_received(struct ofono_modem *modem,
static void history_sms_send_pending(struct ofono_atom *atom, void *data)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
struct ofono_history_context *context = __ofono_atom_get_data(atom);
struct history_sms_foreach_data *hfd = data;
@@ -209,6 +219,7 @@ void __ofono_history_sms_send_pending(struct ofono_modem *modem,
const char *to,
time_t when, const char *text)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
struct history_sms_foreach_data hfd;
hfd.uuid = uuid;