diff options
author | Marcel Holtmann <marcel@holtmann.org> | 2010-09-24 14:14:04 +0900 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2010-09-24 14:14:04 +0900 |
commit | be1912fe9c30426dc138a6a7acec068e9151297e (patch) | |
tree | 5611f2de3e7487493495fd3265875ef4b972ba44 /plugins/g1.c | |
parent | 7ab1258a76c50b45d8de9235ee1e72d1b495d73f (diff) | |
download | ofono-be1912fe9c30426dc138a6a7acec068e9151297e.tar.gz |
Make debug handling with OFONO_AT_DEBUG a bit more consistent
Diffstat (limited to 'plugins/g1.c')
-rw-r--r-- | plugins/g1.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/plugins/g1.c b/plugins/g1.c index fa96eb1e..0cbecef1 100644 --- a/plugins/g1.c +++ b/plugins/g1.c @@ -50,9 +50,11 @@ #include <drivers/atmodem/vendor.h> -static void g1_debug(const char *str, void *data) +static void g1_debug(const char *str, void *user_data) { - ofono_info("%s", str); + const char *prefix = user_data; + + ofono_info("%s%s", prefix, str); } /* Detect hardware, and initialize if found */ @@ -111,8 +113,8 @@ static int g1_enable(struct ofono_modem *modem) if (chat == NULL) return -EIO; - if (getenv("OFONO_AT_DEBUG") != NULL) - g_at_chat_set_debug(chat, g1_debug, NULL); + if (getenv("OFONO_AT_DEBUG")) + g_at_chat_set_debug(chat, g1_debug, ""); ofono_modem_set_data(modem, chat); |