diff options
author | Marcel Holtmann <marcel@holtmann.org> | 2010-09-24 14:37:13 +0900 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2010-09-24 14:37:42 +0900 |
commit | 69a6323633d920ccf869947fed7a649876116035 (patch) | |
tree | daa9a5db8ed0a9b6ab50c8a4608f843a6daffc5e /plugins | |
parent | 71fb9c74c6942074fd52c930487c7eefb9a4e6b0 (diff) | |
download | ofono-69a6323633d920ccf869947fed7a649876116035.tar.bz2 |
calypsomodem: Use better debug strings for DLCs
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/calypso.c | 23 |
1 files changed, 9 insertions, 14 deletions
diff --git a/plugins/calypso.c b/plugins/calypso.c index 8c54d5ec..df5e1d00 100644 --- a/plugins/calypso.c +++ b/plugins/calypso.c @@ -71,11 +71,13 @@ enum powercycle_state { #define NUM_DLC 4 -#define VOICE_DLC 0 -#define NETREG_DLC 1 -#define SMS_DLC 2 -#define AUX_DLC 3 -#define SETUP_DLC 3 +#define VOICE_DLC 0 +#define NETREG_DLC 1 +#define SMS_DLC 2 +#define AUX_DLC 3 +#define SETUP_DLC 3 + +static char *debug_prefixes[NUM_DLC] = { "Voice: ", "Net: ", "SMS: ", "Aux: " }; struct calypso_data { GAtMux *mux; @@ -90,13 +92,6 @@ struct calypso_data { static const char *cpin_prefix[] = { "+CPIN:", NULL }; static const char *none_prefix[] = { NULL }; -static void calypso_dlc_debug(const char *str, void *user_data) -{ - guint dlc = GPOINTER_TO_UINT(user_data); - - ofono_info("DLC%u: %s", dlc, str); -} - static void calypso_debug(const char *str, void *user_data) { const char *prefix = user_data; @@ -282,8 +277,8 @@ static void mux_setup(GAtMux *mux, gpointer user_data) g_io_channel_unref(io); if (getenv("OFONO_AT_DEBUG")) - g_at_chat_set_debug(data->dlcs[i], calypso_dlc_debug, - GUINT_TO_POINTER(i)); + g_at_chat_set_debug(data->dlcs[i], calypso_debug, + debug_prefixes[i]); g_at_chat_set_wakeup_command(data->dlcs[i], "AT\r", 500, 5000); } |