From: Kalle Valo <kalle.valo@canonical.com>
To: ofono@ofono.org
Subject: Re: [PATCH v4 1/3] huawei: detect possible secondary device
Date: Thu, 20 May 2010 13:46:26 +0300 [thread overview]
Message-ID: <87aaruonp9.fsf@potku.valot.fi> (raw)
In-Reply-To: <201005191934.10749.denkenz@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1446 bytes --]
Denis Kenzior <denkenz@gmail.com> writes:
> Hi Kalle,
Hi Denis,
>> struct huawei_data {
>> - GAtChat *chat;
>> + GAtChat *chat, *event;
>> };
>>
>
> Minor nitpick, but we prefer:
> GAtChat *chat;
> GAtChat *event;
>
> in structures.
Changed.
>> @@ -80,6 +81,11 @@ static void huawei_debug(const char *str, void
>> *user_data) ofono_info("%s", str);
>> }
>>
>> +static void huawei_event_debug(const char *str, void *user_data)
>> +{
>> + ofono_info("* %s", str);
>> +}
>> +
>
> There is no need for a separate function here. user_data can be used for
> this:
>
> const char *prefix = user_data;
> ofono_info("%s: %s", prefix, str);
I did it like this:
g_at_chat_set_debug(data->chat, huawei_debug, "");
g_at_chat_set_debug(data->event, huawei_debug, "EventChannel: ");
>> @@ -120,6 +140,20 @@ static int huawei_enable(struct ofono_modem *modem)
>> if (getenv("OFONO_AT_DEBUG"))
>> g_at_chat_set_debug(data->chat, huawei_debug, NULL);
>>
>> + data->event = create_port(modem_device);
>> +
>
> Event port using the modem device again?
Good catch. I actually fixed this, but commited to the wrong patch. I
moved that part now from patch 3 to patch 1.
>> + if (data->event) {
>> + g_at_chat_cancel_all(data->event);
>> + g_at_chat_unregister_all(data->event);
>> + }
>> +
>
> You might want to unref event here instead of cfun_disable
Done.
--
Kalle Valo
next prev parent reply other threads:[~2010-05-20 10:46 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-20 8:04 [PATCH v4 0/3] Huawei GPRS support Kalle Valo
2010-05-20 8:04 ` [PATCH v4 1/3] huawei: detect possible secondary device Kalle Valo
2010-05-20 0:34 ` Denis Kenzior
2010-05-20 10:46 ` Kalle Valo [this message]
2010-05-20 8:04 ` [PATCH v4 2/3] Move report_signal_strength to atutil Kalle Valo
2010-05-20 0:36 ` Denis Kenzior
2010-05-20 10:23 ` Kalle Valo
2010-05-20 8:04 ` [PATCH v4 3/3] huawei: add gprs context Kalle Valo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87aaruonp9.fsf@potku.valot.fi \
--to=kalle.valo@canonical.com \
--cc=ofono@ofono.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox