summaryrefslogtreecommitdiffstats
path: root/plugins/calypso.c
diff options
context:
space:
mode:
authorDenis Kenzior <denkenz@gmail.com>2009-10-15 15:57:12 -0500
committerDenis Kenzior <denkenz@gmail.com>2009-10-15 16:15:18 -0500
commita1ca46253fec029053e4d78a711d7ee22bf98c35 (patch)
tree27b0fabfdb796d2208e91310fb6afbfdc286433a /plugins/calypso.c
parent9f9327e1e512c49888fbd726be2297e9dc8ef312 (diff)
downloadofono-a1ca46253fec029053e4d78a711d7ee22bf98c35.tar.bz2
Setup better debugging information for calypso
Diffstat (limited to 'plugins/calypso.c')
-rw-r--r--plugins/calypso.c21
1 files changed, 17 insertions, 4 deletions
diff --git a/plugins/calypso.c b/plugins/calypso.c
index 217479c7..6552eb63 100644
--- a/plugins/calypso.c
+++ b/plugins/calypso.c
@@ -86,7 +86,19 @@ struct calypso_data {
static void calypso_debug(const char *str, void *data)
{
- DBG("%s", str);
+ guint dlc = GPOINTER_TO_UINT(data);
+
+ DBG("DLC%u: %s", dlc, str);
+}
+
+static void calypso_mux_debug(const char *str, void *data)
+{
+ DBG("MUX: %s", str);
+}
+
+static void calypso_setup_debug(const char *str, void *data)
+{
+ DBG("Setup: %s", str);
}
static int calypso_probe(struct ofono_modem *modem)
@@ -221,7 +233,7 @@ static void mux_setup(GAtMux *mux, gpointer user_data)
data->mux = mux;
if (getenv("OFONO_AT_DEBUG"))
- g_at_mux_set_debug(data->mux, calypso_debug, NULL);
+ g_at_mux_set_debug(data->mux, calypso_mux_debug, NULL);
g_at_mux_start(mux);
@@ -234,7 +246,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_debug, NULL);
+ g_at_chat_set_debug(data->dlcs[i], calypso_debug,
+ GUINT_TO_POINTER(i));
g_at_chat_set_wakeup_command(data->dlcs[i], "\r", 1000, 5000);
}
@@ -285,7 +298,7 @@ static void modem_initialize(struct ofono_modem *modem)
goto error;
if (getenv("OFONO_AT_DEBUG") != NULL)
- g_at_chat_set_debug(chat, calypso_debug, NULL);
+ g_at_chat_set_debug(chat, calypso_setup_debug, NULL);
g_at_chat_set_wakeup_command(chat, "\r", 1000, 5000);