From: Denis Kenzior <denkenz@gmail.com>
To: ofono@ofono.org
Subject: Re: [RFC v3 14/16] elect: Add GatChat and PPP handler
Date: Wed, 14 Dec 2011 19:20:12 -0600 [thread overview]
Message-ID: <4EE94B4C.1010400@gmail.com> (raw)
In-Reply-To: <1323788410-9988-15-git-send-email-wagi@monom.org>
[-- Attachment #1: Type: text/plain, Size: 1293 bytes --]
Hi Daniel,
On 12/13/2011 09:00 AM, Daniel Wagner wrote:
> From: Daniel Wagner <daniel.wagner@bmw-carit.de>
>
> ---
> Makefile.am | 2 +-
> elect/dial.c | 125 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++-
> 2 files changed, 125 insertions(+), 2 deletions(-)
>
<snip>
> +static int open_serial(struct elect_dial *dial)
> +{
> + GAtSyntax *syntax;
> + GIOChannel *channel;
> +
> + channel = g_at_tty_open(dial->path, NULL);
> + if (channel == NULL)
> + return -EIO;
> +
> + syntax = g_at_syntax_new_gsm_permissive();
> + dial->chat = g_at_chat_new(channel, syntax);
> + g_io_channel_unref(channel);
> + g_at_syntax_unref(syntax);
> +
> + if (dial->chat == NULL)
> + return -EIO;
> +
> + g_at_chat_set_debug(dial->chat, dial_debug, "Control");
> +
> + return 0;
> +}
> +
This is another case where the setup of the transport is really breaking
your abstractions. While this might work for RFCOMM ttys which are just
fake ttys (e.g. no serial options, etc) this won't work for real ttys.
You really need to abstract this part and let the plugins setup the
transports. Ideally the core should receive a fully set-up file
descriptor and take it from there.
See src/emulator.c inside oFono for some ideas.
Regards,
-Denis
next prev parent reply other threads:[~2011-12-15 1:20 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-13 14:59 [RFC v3 00/16] Add DUN support Daniel Wagner
2011-12-13 14:59 ` [RFC v3 01/16] elect: Add skeleton implementation Daniel Wagner
2011-12-13 14:59 ` [RFC v3 02/16] elect: Add D-Bus error messages Daniel Wagner
2011-12-13 14:59 ` [RFC v3 03/16] elect: Add D-Bus configuration file Daniel Wagner
2011-12-13 14:59 ` [RFC v3 04/16] elect: Add systemd " Daniel Wagner
2011-12-13 14:59 ` [RFC v3 05/16] elect: Add Manager interface Daniel Wagner
2011-12-13 15:00 ` [RFC v3 06/16] elect: Add skeleton implementation for device Daniel Wagner
2011-12-13 15:00 ` [RFC v3 07/16] elect: Manager append devices Daniel Wagner
2011-12-13 15:00 ` [RFC v3 08/16] bluetooth: Add Serial interface definition Daniel Wagner
2011-12-13 15:00 ` [RFC v3 09/16] elect: Add BlueZ hooks to device Daniel Wagner
2011-12-13 15:00 ` [RFC v3 10/16] elect: Add device D-Bus interface Daniel Wagner
2011-12-13 15:00 ` [RFC v3 11/16] elect: Dis/Connect Serial interface Daniel Wagner
2011-12-15 0:56 ` Denis Kenzior
2011-12-13 15:00 ` [RFC v3 12/16] elect: Add skeleton dial implementation Daniel Wagner
2011-12-15 1:15 ` Denis Kenzior
2011-12-13 15:00 ` [RFC v3 13/16] elect: Add ppp callbacks to device Daniel Wagner
2011-12-13 15:00 ` [RFC v3 14/16] elect: Add GatChat and PPP handler Daniel Wagner
2011-12-15 1:20 ` Denis Kenzior [this message]
2011-12-13 15:00 ` [RFC v3 15/16] elect: Add test scripts Daniel Wagner
2011-12-13 15:00 ` [RFC v3 16/16] elect: Add documentation Daniel Wagner
2011-12-15 1:10 ` Denis Kenzior
2011-12-16 8:44 ` Daniel Wagner
2011-12-16 9:40 ` Marcel Holtmann
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=4EE94B4C.1010400@gmail.com \
--to=denkenz@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.