Open Source Telephony
 help / color / mirror / Atom feed
From: Marcel Holtmann <marcel@holtmann.org>
To: ofono@ofono.org
Subject: Re: [PATCH 2/3] hdlc: handle wrapped buffers
Date: Sat, 17 Apr 2010 15:39:58 -0700	[thread overview]
Message-ID: <1271543998.22838.34.camel@localhost.localdomain> (raw)
In-Reply-To: <1271528135-12337-3-git-send-email-kristen@linux.intel.com>

[-- Attachment #1: Type: text/plain, Size: 1172 bytes --]

Hi Kristen,

> ---
>  gatchat/gathdlc.c |   75 ++++++++++++++++++++++++++++------------------------
>  1 files changed, 40 insertions(+), 35 deletions(-)
> 
> diff --git a/gatchat/gathdlc.c b/gatchat/gathdlc.c
> index c5c02cf..13e15a1 100644
> --- a/gatchat/gathdlc.c
> +++ b/gatchat/gathdlc.c
> @@ -59,11 +59,12 @@ static void new_bytes(GAtHDLC *hdlc)
>  {
>  	unsigned int len = ring_buffer_len(hdlc->read_buffer);
>  	unsigned char *buf = ring_buffer_read_ptr(hdlc->read_buffer, 0);
> +	unsigned int wrap = ring_buffer_len_no_wrap(hdlc->read_buffer);
>  	unsigned char val;
>  	unsigned int pos = 0;
>  
>  	while (pos < len) {
> -		if (buf[pos] == 0x7e) {
> +		if (*buf == 0x7e) {
>  			if (hdlc->receive_func && hdlc->decode_offset > 2 &&
>  						hdlc->decode_fcs == 0xf0b8) {
>  				hdlc->receive_func(hdlc->decode_buffer,

please do this patch fist and send it separately. Intermixing it with
the ACCM support makes it hard to review.

So I like to see the patch series this way:

1) Handle ringbuffer wrapping in HDLC
2) Add recording support for HDLC
3) Add ACCM support to HDLC
4) Port PPP to use HDLC

Regards

Marcel



  reply	other threads:[~2010-04-17 22:39 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-17 18:15 [PATCH 0/3] HDLC fixes Kristen Carlson Accardi
2010-04-17 18:15 ` [PATCH 1/3] hdlc: allow for scanning and escaping Kristen Carlson Accardi
2010-04-17 22:34   ` Marcel Holtmann
2010-04-17 18:15 ` [PATCH 2/3] hdlc: handle wrapped buffers Kristen Carlson Accardi
2010-04-17 22:39   ` Marcel Holtmann [this message]
2010-04-27  3:02     ` Marcel Holtmann
2010-04-17 18:15 ` [PATCH 3/3] ppp: use GAtHDLC Kristen Carlson Accardi
2010-04-17 22:36   ` 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=1271543998.22838.34.camel@localhost.localdomain \
    --to=marcel@holtmann.org \
    --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