ctm: use ofono_error instead of DBG for errors
PATCH 1/1 ctm: use ofono_error instead of DBG for errors
--- src/ctm.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
src/ctm.c +2 -2
@@ -90,7 +90,7 @@ static void ctm_set_enabled_callback(const struct ofono_error *error,DBusMessage *reply;if (error->type !=OFONO_ERROR_TYPE_NO_ERROR ) { -DBG ("Error setting ctm enabled property" ); +ofono_error ("Error setting ctm enabled property" ); reply =__ofono_error_failed (ctm->pending);__ofono_dbus_pending_reply (&ctm->pending, reply);
@@ -116,7 +116,7 @@ static void ctm_query_enabled_callback(const struct ofono_error *error,if (error->type !=OFONO_ERROR_TYPE_NO_ERROR ) {DBusMessage *reply; -DBG ("Error during ctm enabled query" ); +ofono_error ("Error during ctm enabled query" ); reply =__ofono_error_failed (ctm->pending);__ofono_dbus_pending_reply (&ctm->pending, reply);
Signature · 1 line
1.7.3.2
Quoted 1 line · Gustavo F. Padovan
[PATCH] ctm: use
ofono_errorinstead of DBG for errors
I'm a newcomer to ofono, and to this list, but in general I'd hope to see more explanation/justification of code changes than this patch provides. In other words, why is it better to use ofono_error instead of DBG?
Regards,
Neil
Hi Neil,
Quoted 8 lines · Neil Jerram
Quoted 1 line · Gustavo F. Padovan
[PATCH] ctm: use
ofono_errorinstead of DBG for errorsI'm a newcomer to ofono, and to this list, but in general I'd hope to see more explanation/justification of code changes than this patch provides. In other words, why is it better to use
ofono_errorinstead of DBG?
This patch fixes situation where we were reporting error in DBG messages. If we have an error to print it is good to give the right priority to the message. Just look the patch and you will figure out this.
Signature · 2 lines
Gustavo F. Padovan http://profusion.mobi
Quoted 3 lines · Gustavo F. Padovan
This patch fixes situation where we were reporting error in DBG messages. If we have an error to print it is good to give the right priority to the message. Just look the patch and you will figure out this.
OK, so it makes the message more prominent. Thanks for explaining!
Neil
Quoted 18 lines · Gustavo F. Padovan
---
src/ctm.c | 4 ++--1 files changed, 2 insertions(+), 2 deletions(-)src/ctm.c +1
-1@@ -90,7 +90,7 @@ static void ctm_set_enabled_callback(const struct ofono_error *error, DBusMessage *reply; if (error->type != OFONO_ERROR_TYPE_NO_ERROR) { - DBG("Error setting ctm enabled property"); + ofono_error("Error setting ctm enabled property"); reply = __ofono_error_failed(ctm->pending); __ofono_dbus_pending_reply(&ctm->pending, reply);
src/ctm.c static void ctm_query_enabled_callback(const struct ofono_error *error,
Quoted 9 lines
src/ctm.c +1
-2@@ -116,7 +116,7 @@ static void ctm_query_enabled_callback(const struct ofono_error *error, if (error->type != OFONO_ERROR_TYPE_NO_ERROR) { DBusMessage *reply; - DBG("Error during ctm enabled query"); + ofono_error("Error during ctm enabled query"); reply = __ofono_error_failed(ctm->pending); __ofono_dbus_pending_reply(&ctm->pending, reply); --
Then you might want to change the other similar call sites, too. Using the following semantic patch, I hopefully found all of them:
// <smpl>
@r1@
struct ofono_error *error;
@@
if (error->type != OFONO_ERROR_TYPE_NO_ERROR) {
...
- DBG
+ ofono_error
...
}
// </smpl>
See patch attached.
regards,
Lucas De Marchi
src/call-barring.c +3 -3
@@ -327,7 +327,7 @@ static void cb_ss_set_lock_callback(const struct ofono_error *error,struct ofono_call_barring *cb = data;if (error->type !=OFONO_ERROR_TYPE_NO_ERROR ) { -DBG ("Enabling/disabling Call Barring via SS failed" ); +ofono_error ("Enabling/disabling Call Barring via SS failed" );__ofono_dbus_pending_reply (&cb->pending,__ofono_error_failed (cb->pending));return ;
@@ -733,7 +733,7 @@ static void set_lock_callback(const struct ofono_error *error, void *data)struct ofono_call_barring *cb = data;if (error->type !=OFONO_ERROR_TYPE_NO_ERROR ) { -DBG ("Enabling/disabling a lock failed" ); +ofono_error ("Enabling/disabling a lock failed" );__ofono_dbus_pending_reply (&cb->pending,__ofono_error_failed (cb->pending));return ;
@@ -883,7 +883,7 @@ static void disable_all_callback(const struct ofono_error *error, void *data)struct ofono_call_barring *cb = data;if (error->type !=OFONO_ERROR_TYPE_NO_ERROR ) { -DBG ("Disabling all barring failed" ); +ofono_error ("Disabling all barring failed" );__ofono_dbus_pending_reply (&cb->pending,__ofono_error_failed (cb->pending));return ;
src/call-forwarding.c +4 -4
@@ -549,7 +549,7 @@ static void set_property_callback(const struct ofono_error *error, void *data)struct ofono_call_forwarding *cf = data;if (error->type !=OFONO_ERROR_TYPE_NO_ERROR ) { -DBG ("Error occurred during set/erasure" ); +ofono_error ("Error occurred during set/erasure" );__ofono_dbus_pending_reply (&cf->pending,__ofono_error_failed (cf->pending));return ;
@@ -674,7 +674,7 @@ static void disable_conditional_callback(const struct ofono_error *error,struct ofono_call_forwarding *cf = data;if (error->type !=OFONO_ERROR_TYPE_NO_ERROR ) { -DBG ("Error occurred during conditional erasure" ); +ofono_error ("Error occurred during conditional erasure" );__ofono_dbus_pending_reply (&cf->pending,__ofono_error_failed (cf->pending));
@@ -692,7 +692,7 @@ static void disable_all_callback(const struct ofono_error *error, void *data)struct ofono_call_forwarding *cf = data;if (error->type !=OFONO_ERROR_TYPE_NO_ERROR ) { -DBG ("Error occurred during erasure of all" ); +ofono_error ("Error occurred during erasure of all" );__ofono_dbus_pending_reply (&cf->pending,__ofono_error_failed (cf->pending));
@@ -877,7 +877,7 @@ static void cf_ss_control_callback(const struct ofono_error *error, void *data)struct ofono_call_forwarding *cf = data;if (error->type !=OFONO_ERROR_TYPE_NO_ERROR ) { -DBG ("Error occurred during cf ss control set/erasure" ); +ofono_error ("Error occurred during cf ss control set/erasure" );__ofono_dbus_pending_reply (&cf->pending,__ofono_error_failed (cf->pending));
src/call-meter.c +3 -3
@@ -336,7 +336,7 @@ static void set_acm_max_callback(const struct ofono_error *error, void *data)struct ofono_call_meter *cm = data;if (error->type !=OFONO_ERROR_TYPE_NO_ERROR ) { -DBG ("Setting acm_max failed" ); +ofono_error ("Setting acm_max failed" );__ofono_dbus_pending_reply (&cm->pending,__ofono_error_failed (cm->pending));return ;
@@ -397,7 +397,7 @@ static void set_puct_callback(const struct ofono_error *error, void *data)struct ofono_call_meter *cm = data;if (error->type !=OFONO_ERROR_TYPE_NO_ERROR ) { -DBG ("setting puct failed" ); +ofono_error ("setting puct failed" );__ofono_dbus_pending_reply (&cm->pending,__ofono_error_failed (cm->pending));return ;
@@ -594,7 +594,7 @@ static void acm_reset_callback(const struct ofono_error *error, void *data)struct ofono_call_meter *cm = data;if (error->type !=OFONO_ERROR_TYPE_NO_ERROR ) { -DBG ("reseting acm failed" ); +ofono_error ("reseting acm failed" );__ofono_dbus_pending_reply (&cm->pending,__ofono_error_failed (cm->pending));return ;
src/call-settings.c +7 -7
@@ -372,7 +372,7 @@ static void cw_ss_query_callback(const struct ofono_error *error, int status,struct ofono_call_settings *cs = data;if (error->type !=OFONO_ERROR_TYPE_NO_ERROR ) { -DBG ("setting CW via SS failed" ); +ofono_error ("setting CW via SS failed" ); cs->flags &= ~CALL_SETTINGS_FLAG_CACHED ; __ofono_dbus_pending_reply(&cs->pending,
@@ -391,7 +391,7 @@ static void cw_ss_set_callback(const struct ofono_error *error, void *data)struct ofono_call_settings *cs = data;if (error->type !=OFONO_ERROR_TYPE_NO_ERROR ) { -DBG ("setting CW via SS failed" ); +ofono_error ("setting CW via SS failed" );__ofono_dbus_pending_reply (&cs->pending,__ofono_error_failed (cs->pending));
@@ -528,7 +528,7 @@ static void clip_colp_colr_ss_query_cb(const struct ofono_error *error,const char *value;if (error->type !=OFONO_ERROR_TYPE_NO_ERROR ) { -DBG ("Error occurred during ss control query" ); +ofono_error ("Error occurred during ss control query" );__ofono_dbus_pending_reply (&cs->pending,__ofono_error_failed (cs->pending));
@@ -628,7 +628,7 @@ static void clir_ss_query_callback(const struct ofono_error *error,const char *value;if (error->type !=OFONO_ERROR_TYPE_NO_ERROR ) { -DBG ("setting clir via SS failed" ); +ofono_error ("setting clir via SS failed" );__ofono_dbus_pending_reply (&cs->pending,__ofono_error_failed (cs->pending));
@@ -676,7 +676,7 @@ static void clir_ss_set_callback(const struct ofono_error *error, void *data)struct ofono_call_settings *cs = data;if (error->type !=OFONO_ERROR_TYPE_NO_ERROR ) { -DBG ("setting clir via SS failed" ); +ofono_error ("setting clir via SS failed" );__ofono_dbus_pending_reply (&cs->pending,__ofono_error_failed (cs->pending));
@@ -1007,7 +1007,7 @@ static void clir_set_callback(const struct ofono_error *error, void *data)struct ofono_call_settings *cs = data;if (error->type !=OFONO_ERROR_TYPE_NO_ERROR ) { -DBG ("setting clir failed" ); +ofono_error ("setting clir failed" );__ofono_dbus_pending_reply (&cs->pending,__ofono_error_failed (cs->pending));
@@ -1069,7 +1069,7 @@ static void cw_set_callback(const struct ofono_error *error, void *data)struct ofono_call_settings *cs = data;if (error->type !=OFONO_ERROR_TYPE_NO_ERROR ) { -DBG ("Error occurred during CW set" ); +ofono_error ("Error occurred during CW set" );__ofono_dbus_pending_reply (&cs->pending,__ofono_error_failed (cs->pending));
src/cbs.c +1 -1
@@ -344,7 +344,7 @@ static void cbs_set_topics_cb(const struct ofono_error *error, void *data)g_slist_free (cbs->new_topics); cbs->new_topics =NULL ; -DBG ("Setting Cell Broadcast topics failed" ); +ofono_error ("Setting Cell Broadcast topics failed" );__ofono_dbus_pending_reply (&cbs->pending,__ofono_error_failed (cbs->pending));return ;
src/ctm.c +2 -2
@@ -90,7 +90,7 @@ static void ctm_set_enabled_callback(const struct ofono_error *error,DBusMessage *reply;if (error->type !=OFONO_ERROR_TYPE_NO_ERROR ) { -DBG ("Error setting ctm enabled property" ); +ofono_error ("Error setting ctm enabled property" ); reply =__ofono_error_failed (ctm->pending);__ofono_dbus_pending_reply (&ctm->pending, reply);
@@ -116,7 +116,7 @@ static void ctm_query_enabled_callback(const struct ofono_error *error,if (error->type !=OFONO_ERROR_TYPE_NO_ERROR ) {DBusMessage *reply; -DBG ("Error during ctm enabled query" ); +ofono_error ("Error during ctm enabled query" ); reply =__ofono_error_failed (ctm->pending);__ofono_dbus_pending_reply (&ctm->pending, reply);
src/gprs.c +3 -3
@@ -661,7 +661,7 @@ static void pri_activate_callback(const struct ofono_error *error,DBG ("%p %s" , ctx, interface);if (error->type !=OFONO_ERROR_TYPE_NO_ERROR ) { -DBG ("Activating context failed with error: %s" , +ofono_error ("Activating context failed with error: %s" ,telephony_error_to_str (error));__ofono_dbus_pending_reply (&ctx->pending,__ofono_error_failed (ctx->pending));
@@ -699,7 +699,7 @@ static void pri_deactivate_callback(const struct ofono_error *error, void *data)dbus_bool_t value;if (error->type !=OFONO_ERROR_TYPE_NO_ERROR ) { -DBG ("Deactivating context failed with error: %s" , +ofono_error ("Deactivating context failed with error: %s" ,telephony_error_to_str (error));__ofono_dbus_pending_reply (&ctx->pending,__ofono_error_failed (ctx->pending));
@@ -1657,7 +1657,7 @@ static void gprs_deactivate_for_remove(const struct ofono_error *error,const char *atompath;if (error->type !=OFONO_ERROR_TYPE_NO_ERROR ) { -DBG ("Removing context failed with error: %s" , +ofono_error ("Removing context failed with error: %s" ,telephony_error_to_str (error)); __ofono_dbus_pending_reply(&gprs->pending,
src/network.c +4 -4
@@ -181,7 +181,7 @@ static void registration_status_callback(const struct ofono_error *error,struct ofono_netreg *netreg = data;if (error->type !=OFONO_ERROR_TYPE_NO_ERROR ) { -DBG ("Error during registration status query" ); +ofono_error ("Error during registration status query" );return ; }
@@ -1214,7 +1214,7 @@ static void current_operator_callback(const struct ofono_error *error, current =NULL ;if (error->type !=OFONO_ERROR_TYPE_NO_ERROR ) { -DBG ("Error during current operator" ); +ofono_error ("Error during current operator" );return ; }
@@ -1352,7 +1352,7 @@ static void signal_strength_callback(const struct ofono_error *error,struct ofono_netreg *netreg = data;if (error->type !=OFONO_ERROR_TYPE_NO_ERROR ) { -DBG ("Error during signal strength query" ); +ofono_error ("Error during signal strength query" );return ; }
@@ -1366,7 +1366,7 @@ static void init_registration_status(const struct ofono_error *error,struct ofono_netreg *netreg = data;if (error->type !=OFONO_ERROR_TYPE_NO_ERROR ) { -DBG ("Error during registration status query" ); +ofono_error ("Error during registration status query" );return ; }
src/radio-settings.c +6 -6
@@ -251,7 +251,7 @@ static void radio_fast_dormancy_set_callback(const struct ofono_error *error,DBusMessage *reply;if (error->type !=OFONO_ERROR_TYPE_NO_ERROR ) { -DBG ("Error setting fast dormancy" ); +ofono_error ("Error setting fast dormancy" ); rs->fast_dormancy_pending = rs->fast_dormancy;
@@ -304,7 +304,7 @@ static void radio_band_set_callback(const struct ofono_error *error,DBusMessage *reply;if (error->type !=OFONO_ERROR_TYPE_NO_ERROR ) { -DBG ("Error setting radio frequency band" ); +ofono_error ("Error setting radio frequency band" ); rs->pending_band_gsm = rs->band_gsm; rs->pending_band_umts = rs->band_umts;
@@ -348,7 +348,7 @@ static void radio_mode_set_callback(const struct ofono_error *error, void *data)DBusMessage *reply;if (error->type !=OFONO_ERROR_TYPE_NO_ERROR ) { -DBG ("Error setting radio access mode" ); +ofono_error ("Error setting radio access mode" ); rs->pending_mode = rs->mode;
@@ -381,7 +381,7 @@ static void radio_fast_dormancy_query_callback(const struct ofono_error *error,DBusMessage *reply;if (error->type !=OFONO_ERROR_TYPE_NO_ERROR ) { -DBG ("Error during fast dormancy query" ); +ofono_error ("Error during fast dormancy query" ); reply =__ofono_error_failed (rs->pending);__ofono_dbus_pending_reply (&rs->pending, reply);
@@ -413,7 +413,7 @@ static void radio_band_query_callback(const struct ofono_error *error,DBusMessage *reply;if (error->type !=OFONO_ERROR_TYPE_NO_ERROR ) { -DBG ("Error during radio frequency band query" ); +ofono_error ("Error during radio frequency band query" ); reply =__ofono_error_failed (rs->pending);__ofono_dbus_pending_reply (&rs->pending, reply);
@@ -446,7 +446,7 @@ static void radio_rat_mode_query_callback(const struct ofono_error *error,DBusMessage *reply;if (error->type !=OFONO_ERROR_TYPE_NO_ERROR ) { -DBG ("Error during radio access mode query" ); +ofono_error ("Error during radio access mode query" ); reply =__ofono_error_failed (rs->pending);__ofono_dbus_pending_reply (&rs->pending, reply);
src/sms.c +2 -2
@@ -576,7 +576,7 @@ static void bearer_set_callback(const struct ofono_error *error, void *data)struct ofono_sms *sms = data;if (error->type !=OFONO_ERROR_TYPE_NO_ERROR ) { -DBG ("Setting Bearer failed" ); +ofono_error ("Setting Bearer failed" );__ofono_dbus_pending_reply (&sms->pending,__ofono_error_failed (sms->pending));return ;
@@ -611,7 +611,7 @@ static void sca_set_callback(const struct ofono_error *error, void *data)struct ofono_sms *sms = data;if (error->type !=OFONO_ERROR_TYPE_NO_ERROR ) { -DBG ("Setting SCA failed" ); +ofono_error ("Setting SCA failed" );__ofono_dbus_pending_reply (&sms->pending,__ofono_error_failed (sms->pending));return ;
src/ussd.c +1 -1
@@ -656,7 +656,7 @@ static void ussd_cancel_callback(const struct ofono_error *error, void *data)DBusMessage *reply;if (error->type !=OFONO_ERROR_TYPE_NO_ERROR ) { -DBG ("ussd cancel failed with error: %s" , +ofono_error ("ussd cancel failed with error: %s" ,telephony_error_to_str (error)); reply =__ofono_error_failed (ussd->cancel);
src/voicecall.c +3 -3
@@ -1079,7 +1079,7 @@ static struct voicecall *dial_handle_result(struct ofono_voicecall *vc, *need_to_emit = FALSE;if (error->type !=OFONO_ERROR_TYPE_NO_ERROR ) { -DBG ("Dial callback returned error: %s" , +ofono_error ("Dial callback returned error: %s" ,telephony_error_to_str (error));return NULL ;
@@ -1398,7 +1398,7 @@ static void private_chat_callback(const struct ofono_error *error, void *data)GSList *old;if (error->type !=OFONO_ERROR_TYPE_NO_ERROR ) { -DBG ("command failed with error: %s" , +ofono_error ("command failed with error: %s" ,telephony_error_to_str (error));__ofono_dbus_pending_reply (&vc->pending,__ofono_error_failed (vc->pending));
@@ -1498,7 +1498,7 @@ static void multiparty_create_callback(const struct ofono_error *error,GSList *old;if (error->type !=OFONO_ERROR_TYPE_NO_ERROR ) { -DBG ("command failed with error: %s" , +ofono_error ("command failed with error: %s" ,telephony_error_to_str (error));__ofono_dbus_pending_reply (&vc->pending,__ofono_error_failed (vc->pending));
PATCH 1/1 use ofono_error instead of DBG for errors
--- src/call-barring.c | 6 +++--- src/call-forwarding.c | 8 ++++---- src/call-meter.c | 6 +++--- src/call-settings.c | 14 +++++++------- src/cbs.c | 2 +- src/ctm.c | 4 ++-- src/gprs.c | 6 +++--- src/network.c | 8 ++++---- src/radio-settings.c | 12 ++++++------ src/sms.c | 4 ++-- src/ussd.c | 2 +- src/voicecall.c | 6 +++--- 12 files changed, 39 insertions(+), 39 deletions(-)
src/call-barring.c +3 -3
@@ -327,7 +327,7 @@ static void cb_ss_set_lock_callback(const struct ofono_error *error,struct ofono_call_barring *cb = data;if (error->type !=OFONO_ERROR_TYPE_NO_ERROR ) { -DBG ("Enabling/disabling Call Barring via SS failed" ); +ofono_error ("Enabling/disabling Call Barring via SS failed" );__ofono_dbus_pending_reply (&cb->pending,__ofono_error_failed (cb->pending));return ;
@@ -733,7 +733,7 @@ static void set_lock_callback(const struct ofono_error *error, void *data)struct ofono_call_barring *cb = data;if (error->type !=OFONO_ERROR_TYPE_NO_ERROR ) { -DBG ("Enabling/disabling a lock failed" ); +ofono_error ("Enabling/disabling a lock failed" );__ofono_dbus_pending_reply (&cb->pending,__ofono_error_failed (cb->pending));return ;
@@ -883,7 +883,7 @@ static void disable_all_callback(const struct ofono_error *error, void *data)struct ofono_call_barring *cb = data;if (error->type !=OFONO_ERROR_TYPE_NO_ERROR ) { -DBG ("Disabling all barring failed" ); +ofono_error ("Disabling all barring failed" );__ofono_dbus_pending_reply (&cb->pending,__ofono_error_failed (cb->pending));return ;
src/call-forwarding.c +4 -4
@@ -549,7 +549,7 @@ static void set_property_callback(const struct ofono_error *error, void *data)struct ofono_call_forwarding *cf = data;if (error->type !=OFONO_ERROR_TYPE_NO_ERROR ) { -DBG ("Error occurred during set/erasure" ); +ofono_error ("Error occurred during set/erasure" );__ofono_dbus_pending_reply (&cf->pending,__ofono_error_failed (cf->pending));return ;
@@ -674,7 +674,7 @@ static void disable_conditional_callback(const struct ofono_error *error,struct ofono_call_forwarding *cf = data;if (error->type !=OFONO_ERROR_TYPE_NO_ERROR ) { -DBG ("Error occurred during conditional erasure" ); +ofono_error ("Error occurred during conditional erasure" );__ofono_dbus_pending_reply (&cf->pending,__ofono_error_failed (cf->pending));
@@ -692,7 +692,7 @@ static void disable_all_callback(const struct ofono_error *error, void *data)struct ofono_call_forwarding *cf = data;if (error->type !=OFONO_ERROR_TYPE_NO_ERROR ) { -DBG ("Error occurred during erasure of all" ); +ofono_error ("Error occurred during erasure of all" );__ofono_dbus_pending_reply (&cf->pending,__ofono_error_failed (cf->pending));
@@ -877,7 +877,7 @@ static void cf_ss_control_callback(const struct ofono_error *error, void *data)struct ofono_call_forwarding *cf = data;if (error->type !=OFONO_ERROR_TYPE_NO_ERROR ) { -DBG ("Error occurred during cf ss control set/erasure" ); +ofono_error ("Error occurred during cf ss control set/erasure" );__ofono_dbus_pending_reply (&cf->pending,__ofono_error_failed (cf->pending));
src/call-meter.c +3 -3
@@ -336,7 +336,7 @@ static void set_acm_max_callback(const struct ofono_error *error, void *data)struct ofono_call_meter *cm = data;if (error->type !=OFONO_ERROR_TYPE_NO_ERROR ) { -DBG ("Setting acm_max failed" ); +ofono_error ("Setting acm_max failed" );__ofono_dbus_pending_reply (&cm->pending,__ofono_error_failed (cm->pending));return ;
@@ -397,7 +397,7 @@ static void set_puct_callback(const struct ofono_error *error, void *data)struct ofono_call_meter *cm = data;if (error->type !=OFONO_ERROR_TYPE_NO_ERROR ) { -DBG ("setting puct failed" ); +ofono_error ("setting puct failed" );__ofono_dbus_pending_reply (&cm->pending,__ofono_error_failed (cm->pending));return ;
@@ -594,7 +594,7 @@ static void acm_reset_callback(const struct ofono_error *error, void *data)struct ofono_call_meter *cm = data;if (error->type !=OFONO_ERROR_TYPE_NO_ERROR ) { -DBG ("reseting acm failed" ); +ofono_error ("reseting acm failed" );__ofono_dbus_pending_reply (&cm->pending,__ofono_error_failed (cm->pending));return ;
src/call-settings.c +7 -7
@@ -372,7 +372,7 @@ static void cw_ss_query_callback(const struct ofono_error *error, int status,struct ofono_call_settings *cs = data;if (error->type !=OFONO_ERROR_TYPE_NO_ERROR ) { -DBG ("setting CW via SS failed" ); +ofono_error ("setting CW via SS failed" ); cs->flags &= ~CALL_SETTINGS_FLAG_CACHED ; __ofono_dbus_pending_reply(&cs->pending,
@@ -391,7 +391,7 @@ static void cw_ss_set_callback(const struct ofono_error *error, void *data)struct ofono_call_settings *cs = data;if (error->type !=OFONO_ERROR_TYPE_NO_ERROR ) { -DBG ("setting CW via SS failed" ); +ofono_error ("setting CW via SS failed" );__ofono_dbus_pending_reply (&cs->pending,__ofono_error_failed (cs->pending));
@@ -528,7 +528,7 @@ static void clip_colp_colr_ss_query_cb(const struct ofono_error *error,const char *value;if (error->type !=OFONO_ERROR_TYPE_NO_ERROR ) { -DBG ("Error occurred during ss control query" ); +ofono_error ("Error occurred during ss control query" );__ofono_dbus_pending_reply (&cs->pending,__ofono_error_failed (cs->pending));
@@ -628,7 +628,7 @@ static void clir_ss_query_callback(const struct ofono_error *error,const char *value;if (error->type !=OFONO_ERROR_TYPE_NO_ERROR ) { -DBG ("setting clir via SS failed" ); +ofono_error ("setting clir via SS failed" );__ofono_dbus_pending_reply (&cs->pending,__ofono_error_failed (cs->pending));
@@ -676,7 +676,7 @@ static void clir_ss_set_callback(const struct ofono_error *error, void *data)struct ofono_call_settings *cs = data;if (error->type !=OFONO_ERROR_TYPE_NO_ERROR ) { -DBG ("setting clir via SS failed" ); +ofono_error ("setting clir via SS failed" );__ofono_dbus_pending_reply (&cs->pending,__ofono_error_failed (cs->pending));
@@ -1007,7 +1007,7 @@ static void clir_set_callback(const struct ofono_error *error, void *data)struct ofono_call_settings *cs = data;if (error->type !=OFONO_ERROR_TYPE_NO_ERROR ) { -DBG ("setting clir failed" ); +ofono_error ("setting clir failed" );__ofono_dbus_pending_reply (&cs->pending,__ofono_error_failed (cs->pending));
@@ -1069,7 +1069,7 @@ static void cw_set_callback(const struct ofono_error *error, void *data)struct ofono_call_settings *cs = data;if (error->type !=OFONO_ERROR_TYPE_NO_ERROR ) { -DBG ("Error occurred during CW set" ); +ofono_error ("Error occurred during CW set" );__ofono_dbus_pending_reply (&cs->pending,__ofono_error_failed (cs->pending));
src/cbs.c +1 -1
@@ -344,7 +344,7 @@ static void cbs_set_topics_cb(const struct ofono_error *error, void *data)g_slist_free (cbs->new_topics); cbs->new_topics =NULL ; -DBG ("Setting Cell Broadcast topics failed" ); +ofono_error ("Setting Cell Broadcast topics failed" );__ofono_dbus_pending_reply (&cbs->pending,__ofono_error_failed (cbs->pending));return ;
src/ctm.c +2 -2
@@ -90,7 +90,7 @@ static void ctm_set_enabled_callback(const struct ofono_error *error,DBusMessage *reply;if (error->type !=OFONO_ERROR_TYPE_NO_ERROR ) { -DBG ("Error setting ctm enabled property" ); +ofono_error ("Error setting ctm enabled property" ); reply =__ofono_error_failed (ctm->pending);__ofono_dbus_pending_reply (&ctm->pending, reply);
@@ -116,7 +116,7 @@ static void ctm_query_enabled_callback(const struct ofono_error *error,if (error->type !=OFONO_ERROR_TYPE_NO_ERROR ) {DBusMessage *reply; -DBG ("Error during ctm enabled query" ); +ofono_error ("Error during ctm enabled query" ); reply =__ofono_error_failed (ctm->pending);__ofono_dbus_pending_reply (&ctm->pending, reply);
src/gprs.c +3 -3
@@ -661,7 +661,7 @@ static void pri_activate_callback(const struct ofono_error *error,DBG ("%p %s" , ctx, interface);if (error->type !=OFONO_ERROR_TYPE_NO_ERROR ) { -DBG ("Activating context failed with error: %s" , +ofono_error ("Activating context failed with error: %s" ,telephony_error_to_str (error));__ofono_dbus_pending_reply (&ctx->pending,__ofono_error_failed (ctx->pending));
@@ -699,7 +699,7 @@ static void pri_deactivate_callback(const struct ofono_error *error, void *data)dbus_bool_t value;if (error->type !=OFONO_ERROR_TYPE_NO_ERROR ) { -DBG ("Deactivating context failed with error: %s" , +ofono_error ("Deactivating context failed with error: %s" ,telephony_error_to_str (error));__ofono_dbus_pending_reply (&ctx->pending,__ofono_error_failed (ctx->pending));
@@ -1657,7 +1657,7 @@ static void gprs_deactivate_for_remove(const struct ofono_error *error,const char *atompath;if (error->type !=OFONO_ERROR_TYPE_NO_ERROR ) { -DBG ("Removing context failed with error: %s" , +ofono_error ("Removing context failed with error: %s" ,telephony_error_to_str (error)); __ofono_dbus_pending_reply(&gprs->pending,
src/network.c +4 -4
@@ -181,7 +181,7 @@ static void registration_status_callback(const struct ofono_error *error,struct ofono_netreg *netreg = data;if (error->type !=OFONO_ERROR_TYPE_NO_ERROR ) { -DBG ("Error during registration status query" ); +ofono_error ("Error during registration status query" );return ; }
@@ -1214,7 +1214,7 @@ static void current_operator_callback(const struct ofono_error *error, current =NULL ;if (error->type !=OFONO_ERROR_TYPE_NO_ERROR ) { -DBG ("Error during current operator" ); +ofono_error ("Error during current operator" );return ; }
@@ -1352,7 +1352,7 @@ static void signal_strength_callback(const struct ofono_error *error,struct ofono_netreg *netreg = data;if (error->type !=OFONO_ERROR_TYPE_NO_ERROR ) { -DBG ("Error during signal strength query" ); +ofono_error ("Error during signal strength query" );return ; }
@@ -1366,7 +1366,7 @@ static void init_registration_status(const struct ofono_error *error,struct ofono_netreg *netreg = data;if (error->type !=OFONO_ERROR_TYPE_NO_ERROR ) { -DBG ("Error during registration status query" ); +ofono_error ("Error during registration status query" );return ; }
src/radio-settings.c +6 -6
@@ -251,7 +251,7 @@ static void radio_fast_dormancy_set_callback(const struct ofono_error *error,DBusMessage *reply;if (error->type !=OFONO_ERROR_TYPE_NO_ERROR ) { -DBG ("Error setting fast dormancy" ); +ofono_error ("Error setting fast dormancy" ); rs->fast_dormancy_pending = rs->fast_dormancy;
@@ -304,7 +304,7 @@ static void radio_band_set_callback(const struct ofono_error *error,DBusMessage *reply;if (error->type !=OFONO_ERROR_TYPE_NO_ERROR ) { -DBG ("Error setting radio frequency band" ); +ofono_error ("Error setting radio frequency band" ); rs->pending_band_gsm = rs->band_gsm; rs->pending_band_umts = rs->band_umts;
@@ -348,7 +348,7 @@ static void radio_mode_set_callback(const struct ofono_error *error, void *data)DBusMessage *reply;if (error->type !=OFONO_ERROR_TYPE_NO_ERROR ) { -DBG ("Error setting radio access mode" ); +ofono_error ("Error setting radio access mode" ); rs->pending_mode = rs->mode;
@@ -381,7 +381,7 @@ static void radio_fast_dormancy_query_callback(const struct ofono_error *error,DBusMessage *reply;if (error->type !=OFONO_ERROR_TYPE_NO_ERROR ) { -DBG ("Error during fast dormancy query" ); +ofono_error ("Error during fast dormancy query" ); reply =__ofono_error_failed (rs->pending);__ofono_dbus_pending_reply (&rs->pending, reply);
@@ -413,7 +413,7 @@ static void radio_band_query_callback(const struct ofono_error *error,DBusMessage *reply;if (error->type !=OFONO_ERROR_TYPE_NO_ERROR ) { -DBG ("Error during radio frequency band query" ); +ofono_error ("Error during radio frequency band query" ); reply =__ofono_error_failed (rs->pending);__ofono_dbus_pending_reply (&rs->pending, reply);
@@ -446,7 +446,7 @@ static void radio_rat_mode_query_callback(const struct ofono_error *error,DBusMessage *reply;if (error->type !=OFONO_ERROR_TYPE_NO_ERROR ) { -DBG ("Error during radio access mode query" ); +ofono_error ("Error during radio access mode query" ); reply =__ofono_error_failed (rs->pending);__ofono_dbus_pending_reply (&rs->pending, reply);
src/sms.c +2 -2
@@ -576,7 +576,7 @@ static void bearer_set_callback(const struct ofono_error *error, void *data)struct ofono_sms *sms = data;if (error->type !=OFONO_ERROR_TYPE_NO_ERROR ) { -DBG ("Setting Bearer failed" ); +ofono_error ("Setting Bearer failed" );__ofono_dbus_pending_reply (&sms->pending,__ofono_error_failed (sms->pending));return ;
@@ -611,7 +611,7 @@ static void sca_set_callback(const struct ofono_error *error, void *data)struct ofono_sms *sms = data;if (error->type !=OFONO_ERROR_TYPE_NO_ERROR ) { -DBG ("Setting SCA failed" ); +ofono_error ("Setting SCA failed" );__ofono_dbus_pending_reply (&sms->pending,__ofono_error_failed (sms->pending));return ;
src/ussd.c +1 -1
@@ -656,7 +656,7 @@ static void ussd_cancel_callback(const struct ofono_error *error, void *data)DBusMessage *reply;if (error->type !=OFONO_ERROR_TYPE_NO_ERROR ) { -DBG ("ussd cancel failed with error: %s" , +ofono_error ("ussd cancel failed with error: %s" ,telephony_error_to_str (error)); reply =__ofono_error_failed (ussd->cancel);
src/voicecall.c +3 -3
@@ -1079,7 +1079,7 @@ static struct voicecall *dial_handle_result(struct ofono_voicecall *vc, *need_to_emit = FALSE;if (error->type !=OFONO_ERROR_TYPE_NO_ERROR ) { -DBG ("Dial callback returned error: %s" , +ofono_error ("Dial callback returned error: %s" ,telephony_error_to_str (error));return NULL ;
@@ -1398,7 +1398,7 @@ static void private_chat_callback(const struct ofono_error *error, void *data)GSList *old;if (error->type !=OFONO_ERROR_TYPE_NO_ERROR ) { -DBG ("command failed with error: %s" , +ofono_error ("command failed with error: %s" ,telephony_error_to_str (error));__ofono_dbus_pending_reply (&vc->pending,__ofono_error_failed (vc->pending));
@@ -1498,7 +1498,7 @@ static void multiparty_create_callback(const struct ofono_error *error,GSList *old;if (error->type !=OFONO_ERROR_TYPE_NO_ERROR ) { -DBG ("command failed with error: %s" , +ofono_error ("command failed with error: %s" ,telephony_error_to_str (error));__ofono_dbus_pending_reply (&vc->pending,__ofono_error_failed (vc->pending));
Signature · 1 line
1.7.3.2
Re: [PATCH] use ofono_error instead of DBG for errors
Hi Gustavo,
Quoted 6 lines · Gustavo F. Padovan
--- src/call-barring.c | 6 +++--- src/call-forwarding.c | 8 ++++---- src/call-meter.c | 6 +++--- src/call-settings.c | 14 +++++++------- src/cbs.c | 2 +-
Quoted 9 lines
src/ctm.c | 4 ++-- src/gprs.c | 6 +++--- src/network.c | 8 ++++---- src/radio-settings.c | 12 ++++++------ src/sms.c | 4 ++-- src/ussd.c | 2 +- src/voicecall.c | 6 +++--- 12 files changed, 39 insertions(+), 39 deletions(-)
Actually some of these should be DBG and not ofono_error. In many of these cases the input depends on the user (e.g. having the right password, etc) so reporting an error is the wrong thing to do. In other cases the error depends on the network state, etc.
src/call-barring.c static void cb_ss_set_lock_callback(const struct ofono_error *error, · line 333
Quoted 13 lines
src/call-barring.c +1
-1@@ -327,7 +327,7 @@ static void cb_ss_set_lock_callback(const struct ofono_error *error,struct ofono_call_barring *cb = data;if (error->type !=OFONO_ERROR_TYPE_NO_ERROR ) { -DBG ("Enabling/disabling Call Barring via SS failed" ); +ofono_error ("Enabling/disabling Call Barring via SS failed" );__ofono_dbus_pending_reply (&cb->pending,__ofono_error_failed (cb->pending));return ;
For instance, this one requires PIN2
src/call-barring.c static void set_lock_callback(const struct ofono_error *error, void *data) · line 739
Quoted 9 lines
src/call-barring.c +1
-1@@ -733,7 +733,7 @@ static void set_lock_callback(const struct ofono_error *error, void *data)struct ofono_call_barring *cb = data;if (error->type !=OFONO_ERROR_TYPE_NO_ERROR ) { -DBG ("Enabling/disabling a lock failed" ); +ofono_error ("Enabling/disabling a lock failed" );__ofono_dbus_pending_reply (&cb->pending,__ofono_error_failed (cb->pending));return ;
Same as above
src/call-barring.c static void disable_all_callback(const struct ofono_error *error, void *data) · line 888
Quoted 8 lines
src/call-barring.c +1
-1@@ -883,7 +883,7 @@ static void disable_all_callback(const struct ofono_error *error, void *data)struct ofono_call_barring *cb = data;if (error->type !=OFONO_ERROR_TYPE_NO_ERROR ) { -DBG ("Disabling all barring failed" ); +ofono_error ("Disabling all barring failed" );__ofono_dbus_pending_reply (&cb->pending,__ofono_error_failed (cb->pending));
And here
Quoted 33 lines
src/call-barring.c +0
-0return ;src/call-forwarding.c +3
-3@@ -549,7 +549,7 @@ static void set_property_callback(const struct ofono_error *error, void *data)struct ofono_call_forwarding *cf = data;if (error->type !=OFONO_ERROR_TYPE_NO_ERROR ) { -DBG ("Error occurred during set/erasure" ); +ofono_error ("Error occurred during set/erasure" );__ofono_dbus_pending_reply (&cf->pending,__ofono_error_failed (cf->pending));return ;@@ -674,7 +674,7 @@ static void disable_conditional_callback(const struct ofono_error *error,struct ofono_call_forwarding *cf = data;if (error->type !=OFONO_ERROR_TYPE_NO_ERROR ) { -DBG ("Error occurred during conditional erasure" ); +ofono_error ("Error occurred during conditional erasure" );__ofono_dbus_pending_reply (&cf->pending,__ofono_error_failed (cf->pending));@@ -692,7 +692,7 @@ static void disable_all_callback(const struct ofono_error *error, void *data)struct ofono_call_forwarding *cf = data;if (error->type !=OFONO_ERROR_TYPE_NO_ERROR ) { -DBG ("Error occurred during erasure of all" ); +ofono_error ("Error occurred during erasure of all" );__ofono_dbus_pending_reply (&cf->pending,__ofono_error_failed (cf->pending));
src/call-forwarding.c static void cf_ss_control_callback(const struct ofono_error *error, void *data) · line 883
Quoted 8 lines
src/call-forwarding.c +1
-1@@ -877,7 +877,7 @@ static void cf_ss_control_callback(const struct ofono_error *error, void *data)struct ofono_call_forwarding *cf = data;if (error->type !=OFONO_ERROR_TYPE_NO_ERROR ) { -DBG ("Error occurred during cf ss control set/erasure" ); +ofono_error ("Error occurred during cf ss control set/erasure" );__ofono_dbus_pending_reply (&cf->pending,__ofono_error_failed (cf->pending));
These depend on the network state and can fail...
Quoted 23 lines
src/call-meter.c +2
-2@@ -336,7 +336,7 @@ static void set_acm_max_callback(const struct ofono_error *error, void *data)struct ofono_call_meter *cm = data;if (error->type !=OFONO_ERROR_TYPE_NO_ERROR ) { -DBG ("Setting acm_max failed" ); +ofono_error ("Setting acm_max failed" );__ofono_dbus_pending_reply (&cm->pending,__ofono_error_failed (cm->pending));return ;@@ -397,7 +397,7 @@ static void set_puct_callback(const struct ofono_error *error, void *data)struct ofono_call_meter *cm = data;if (error->type !=OFONO_ERROR_TYPE_NO_ERROR ) { -DBG ("setting puct failed" ); +ofono_error ("setting puct failed" );__ofono_dbus_pending_reply (&cm->pending,__ofono_error_failed (cm->pending));return ;
src/call-meter.c static void acm_reset_callback(const struct ofono_error *error, void *data) · line 600
Quoted 8 lines
src/call-meter.c +1
-1@@ -594,7 +594,7 @@ static void acm_reset_callback(const struct ofono_error *error, void *data)struct ofono_call_meter *cm = data;if (error->type !=OFONO_ERROR_TYPE_NO_ERROR ) { -DBG ("reseting acm failed" ); +ofono_error ("reseting acm failed" );__ofono_dbus_pending_reply (&cm->pending,__ofono_error_failed (cm->pending));return ;
All these require PIN2
Quoted 59 lines
src/call-settings.c +6
-6@@ -372,7 +372,7 @@ static void cw_ss_query_callback(const struct ofono_error *error, int status,struct ofono_call_settings *cs = data;if (error->type !=OFONO_ERROR_TYPE_NO_ERROR ) { -DBG ("setting CW via SS failed" ); +ofono_error ("setting CW via SS failed" ); cs->flags &= ~CALL_SETTINGS_FLAG_CACHED ; __ofono_dbus_pending_reply(&cs->pending,@@ -391,7 +391,7 @@ static void cw_ss_set_callback(const struct ofono_error *error, void *data)struct ofono_call_settings *cs = data;if (error->type !=OFONO_ERROR_TYPE_NO_ERROR ) { -DBG ("setting CW via SS failed" ); +ofono_error ("setting CW via SS failed" );__ofono_dbus_pending_reply (&cs->pending,__ofono_error_failed (cs->pending));@@ -528,7 +528,7 @@ static void clip_colp_colr_ss_query_cb(const struct ofono_error *error,const char *value;if (error->type !=OFONO_ERROR_TYPE_NO_ERROR ) { -DBG ("Error occurred during ss control query" ); +ofono_error ("Error occurred during ss control query" );__ofono_dbus_pending_reply (&cs->pending,__ofono_error_failed (cs->pending));@@ -628,7 +628,7 @@ static void clir_ss_query_callback(const struct ofono_error *error,const char *value;if (error->type !=OFONO_ERROR_TYPE_NO_ERROR ) { -DBG ("setting clir via SS failed" ); +ofono_error ("setting clir via SS failed" );__ofono_dbus_pending_reply (&cs->pending,__ofono_error_failed (cs->pending));@@ -676,7 +676,7 @@ static void clir_ss_set_callback(const struct ofono_error *error, void *data)struct ofono_call_settings *cs = data;if (error->type !=OFONO_ERROR_TYPE_NO_ERROR ) { -DBG ("setting clir via SS failed" ); +ofono_error ("setting clir via SS failed" );__ofono_dbus_pending_reply (&cs->pending,__ofono_error_failed (cs->pending));@@ -1007,7 +1007,7 @@ static void clir_set_callback(const struct ofono_error *error, void *data)struct ofono_call_settings *cs = data;if (error->type !=OFONO_ERROR_TYPE_NO_ERROR ) { -DBG ("setting clir failed" ); +ofono_error ("setting clir failed" );__ofono_dbus_pending_reply (&cs->pending,__ofono_error_failed (cs->pending));
src/call-settings.c static void cw_set_callback(const struct ofono_error *error, void *data) · line 1075
Quoted 8 lines
src/call-settings.c +1
-1@@ -1069,7 +1069,7 @@ static void cw_set_callback(const struct ofono_error *error, void *data)struct ofono_call_settings *cs = data;if (error->type !=OFONO_ERROR_TYPE_NO_ERROR ) { -DBG ("Error occurred during CW set" ); +ofono_error ("Error occurred during CW set" );__ofono_dbus_pending_reply (&cs->pending,__ofono_error_failed (cs->pending));
These can all depend on the network state..
src/cbs.c static void cbs_set_topics_cb(const struct ofono_error *error, void *data) · line 350
Quoted 13 lines
src/cbs.c +1
-1@@ -344,7 +344,7 @@ static void cbs_set_topics_cb(const struct ofono_error *error, void *data)g_slist_free (cbs->new_topics); cbs->new_topics =NULL ; -DBG ("Setting Cell Broadcast topics failed" ); +ofono_error ("Setting Cell Broadcast topics failed" );__ofono_dbus_pending_reply (&cbs->pending,__ofono_error_failed (cbs->pending));return ;
This one is probably valid
Quoted 14 lines
src/ctm.c +1
-1@@ -90,7 +90,7 @@ static void ctm_set_enabled_callback(const struct ofono_error *error,DBusMessage *reply;if (error->type !=OFONO_ERROR_TYPE_NO_ERROR ) { -DBG ("Error setting ctm enabled property" ); +ofono_error ("Error setting ctm enabled property" ); reply =__ofono_error_failed (ctm->pending);__ofono_dbus_pending_reply (&ctm->pending, reply);
src/ctm.c static void ctm_query_enabled_callback(const struct ofono_error *error, · line 122
Quoted 8 lines
src/ctm.c +1
-1@@ -116,7 +116,7 @@ static void ctm_query_enabled_callback(const struct ofono_error *error,if (error->type !=OFONO_ERROR_TYPE_NO_ERROR ) {DBusMessage *reply; -DBG ("Error during ctm enabled query" ); +ofono_error ("Error during ctm enabled query" ); reply =__ofono_error_failed (ctm->pending);__ofono_dbus_pending_reply (&ctm->pending, reply);
And these ones as well
src/gprs.c static void pri_activate_callback(const struct ofono_error *error, · line 667
Quoted 13 lines
src/gprs.c +1
-1@@ -661,7 +661,7 @@ static void pri_activate_callback(const struct ofono_error *error,DBG ("%p %s" , ctx, interface);if (error->type !=OFONO_ERROR_TYPE_NO_ERROR ) { -DBG ("Activating context failed with error: %s" , +ofono_error ("Activating context failed with error: %s" ,telephony_error_to_str (error));__ofono_dbus_pending_reply (&ctx->pending,__ofono_error_failed (ctx->pending));
This one can fail, e.g. invalid username / password
Quoted 10 lines
src/gprs.c +1
-1@@ -699,7 +699,7 @@ static void pri_deactivate_callback(const struct ofono_error *error, void *data)dbus_bool_t value;if (error->type !=OFONO_ERROR_TYPE_NO_ERROR ) { -DBG ("Deactivating context failed with error: %s" , +ofono_error ("Deactivating context failed with error: %s" ,telephony_error_to_str (error));__ofono_dbus_pending_reply (&ctx->pending,__ofono_error_failed (ctx->pending));
src/gprs.c static void gprs_deactivate_for_remove(const struct ofono_error *error, · line 1663
Quoted 8 lines
src/gprs.c +1
-1@@ -1657,7 +1657,7 @@ static void gprs_deactivate_for_remove(const struct ofono_error *error,const char *atompath;if (error->type !=OFONO_ERROR_TYPE_NO_ERROR ) { -DBG ("Removing context failed with error: %s" , +ofono_error ("Removing context failed with error: %s" ,telephony_error_to_str (error)); __ofono_dbus_pending_reply(&gprs->pending,
Rest are probably valid
Quoted 32 lines
src/network.c +3
-3@@ -181,7 +181,7 @@ static void registration_status_callback(const struct ofono_error *error,struct ofono_netreg *netreg = data;if (error->type !=OFONO_ERROR_TYPE_NO_ERROR ) { -DBG ("Error during registration status query" ); +ofono_error ("Error during registration status query" );return ; }@@ -1214,7 +1214,7 @@ static void current_operator_callback(const struct ofono_error *error, current =NULL ;if (error->type !=OFONO_ERROR_TYPE_NO_ERROR ) { -DBG ("Error during current operator" ); +ofono_error ("Error during current operator" );return ; }@@ -1352,7 +1352,7 @@ static void signal_strength_callback(const struct ofono_error *error,struct ofono_netreg *netreg = data;if (error->type !=OFONO_ERROR_TYPE_NO_ERROR ) { -DBG ("Error during signal strength query" ); +ofono_error ("Error during signal strength query" );return ; }
src/network.c static void init_registration_status(const struct ofono_error *error, · line 1372
Quoted 8 lines
src/network.c +1
-1@@ -1366,7 +1366,7 @@ static void init_registration_status(const struct ofono_error *error,struct ofono_netreg *netreg = data;if (error->type !=OFONO_ERROR_TYPE_NO_ERROR ) { -DBG ("Error during registration status query" ); +ofono_error ("Error during registration status query" );return ; }
I'm fine with these being changed
Quoted 50 lines
src/radio-settings.c +5
-5@@ -251,7 +251,7 @@ static void radio_fast_dormancy_set_callback(const struct ofono_error *error,DBusMessage *reply;if (error->type !=OFONO_ERROR_TYPE_NO_ERROR ) { -DBG ("Error setting fast dormancy" ); +ofono_error ("Error setting fast dormancy" ); rs->fast_dormancy_pending = rs->fast_dormancy;@@ -304,7 +304,7 @@ static void radio_band_set_callback(const struct ofono_error *error,DBusMessage *reply;if (error->type !=OFONO_ERROR_TYPE_NO_ERROR ) { -DBG ("Error setting radio frequency band" ); +ofono_error ("Error setting radio frequency band" ); rs->pending_band_gsm = rs->band_gsm; rs->pending_band_umts = rs->band_umts;@@ -348,7 +348,7 @@ static void radio_mode_set_callback(const struct ofono_error *error, void *data)DBusMessage *reply;if (error->type !=OFONO_ERROR_TYPE_NO_ERROR ) { -DBG ("Error setting radio access mode" ); +ofono_error ("Error setting radio access mode" ); rs->pending_mode = rs->mode;@@ -381,7 +381,7 @@ static void radio_fast_dormancy_query_callback(const struct ofono_error *error,DBusMessage *reply;if (error->type !=OFONO_ERROR_TYPE_NO_ERROR ) { -DBG ("Error during fast dormancy query" ); +ofono_error ("Error during fast dormancy query" ); reply =__ofono_error_failed (rs->pending);__ofono_dbus_pending_reply (&rs->pending, reply);@@ -413,7 +413,7 @@ static void radio_band_query_callback(const struct ofono_error *error,DBusMessage *reply;if (error->type !=OFONO_ERROR_TYPE_NO_ERROR ) { -DBG ("Error during radio frequency band query" ); +ofono_error ("Error during radio frequency band query" ); reply =__ofono_error_failed (rs->pending);__ofono_dbus_pending_reply (&rs->pending, reply);
src/radio-settings.c static void radio_rat_mode_query_callback(const struct ofono_error *error, · line 452
Quoted 8 lines
src/radio-settings.c +1
-1@@ -446,7 +446,7 @@ static void radio_rat_mode_query_callback(const struct ofono_error *error,DBusMessage *reply;if (error->type !=OFONO_ERROR_TYPE_NO_ERROR ) { -DBG ("Error during radio access mode query" ); +ofono_error ("Error during radio access mode query" ); reply =__ofono_error_failed (rs->pending);__ofono_dbus_pending_reply (&rs->pending, reply);
I'm fine with the above since they're local queries, not going to the network.
src/sms.c static void bearer_set_callback(const struct ofono_error *error, void *data) · line 581
Quoted 12 lines
src/sms.c +1
-1@@ -576,7 +576,7 @@ static void bearer_set_callback(const struct ofono_error *error, void *data)struct ofono_sms *sms = data;if (error->type !=OFONO_ERROR_TYPE_NO_ERROR ) { -DBG ("Setting Bearer failed" ); +ofono_error ("Setting Bearer failed" );__ofono_dbus_pending_reply (&sms->pending,__ofono_error_failed (sms->pending));
This one is valid
src/sms.c static void sca_set_callback(const struct ofono_error *error, void *data) · line 616
Quoted 9 lines
src/sms.c +1
-1return ;@@ -611,7 +611,7 @@ static void sca_set_callback(const struct ofono_error *error, void *data)struct ofono_sms *sms = data;if (error->type !=OFONO_ERROR_TYPE_NO_ERROR ) { -DBG ("Setting SCA failed" ); +ofono_error ("Setting SCA failed" );__ofono_dbus_pending_reply (&sms->pending,__ofono_error_failed (sms->pending));
This one is valid
src/ussd.c static void ussd_cancel_callback(const struct ofono_error *error, void *data) · line 660
Quoted 12 lines
src/sms.c +0
-0return ;src/ussd.c +1
-1@@ -656,7 +656,7 @@ static void ussd_cancel_callback(const struct ofono_error *error, void *data)DBusMessage *reply;if (error->type !=OFONO_ERROR_TYPE_NO_ERROR ) { -DBG ("ussd cancel failed with error: %s" , +ofono_error ("ussd cancel failed with error: %s" ,telephony_error_to_str (error));
This one is valid
Quoted 25 lines
src/ussd.c +0
-0reply =__ofono_error_failed (ussd->cancel);src/voicecall.c +2
-2@@ -1079,7 +1079,7 @@ static struct voicecall *dial_handle_result(struct ofono_voicecall *vc, *need_to_emit = FALSE;if (error->type !=OFONO_ERROR_TYPE_NO_ERROR ) { -DBG ("Dial callback returned error: %s" , +ofono_error ("Dial callback returned error: %s" ,telephony_error_to_str (error));return NULL ;@@ -1398,7 +1398,7 @@ static void private_chat_callback(const struct ofono_error *error, void *data)GSList *old;if (error->type !=OFONO_ERROR_TYPE_NO_ERROR ) { -DBG ("command failed with error: %s" , +ofono_error ("command failed with error: %s" ,telephony_error_to_str (error));__ofono_dbus_pending_reply (&vc->pending,__ofono_error_failed (vc->pending));
src/voicecall.c static void multiparty_create_callback(const struct ofono_error *error, · line 1504
Quoted 8 lines
src/voicecall.c +1
-1@@ -1498,7 +1498,7 @@ static void multiparty_create_callback(const struct ofono_error *error,GSList *old;if (error->type !=OFONO_ERROR_TYPE_NO_ERROR ) { -DBG ("command failed with error: %s" , +ofono_error ("command failed with error: %s" ,telephony_error_to_str (error));__ofono_dbus_pending_reply (&vc->pending,__ofono_error_failed (vc->pending));
These can all fail due to network conditions, and should not really be printed.
Regards,
-Denis