[RFC] gsmd multi-line response support, 2nd try

Harald Welte laforge at openmoko.org
Tue Jul 31 12:36:58 CEST 2007

On Tue, Jul 31, 2007 at 11:11:58AM +0200, pHilipp Zabel wrote:
> On 7/31/07, Harald Welte <laforge at openmoko.org> wrote:
> > On Mon, Jun 18, 2007 at 04:16:41PM +0200, Philipp Zabel wrote:
> > > Hi!
> > >
> > > This second try works much better in that every extended response causes
> > > a flush of the previous mlbuf and starts collecting new response lines.
> > > Also, final_cb is now really only reached for final responses and the
> > > code for case 'A' won't overwrite the command buffer with the response
> > > anymore. I throw in '\n' as a separator for multi-line responses, and
> > > the callback is called for each response this way.
> >
> > I've now committed this patch, just changing one minor detail: the
> > static size of 1024 for mlbuf has been replaced with a constat that's
> > defined in the header file to 65535.
> >
> > I'd actually prefer to have that buffer static in bss, rather than
> > putting it on the stack every time we enter the parser.
> Like this?

thinking more about it, we should not have any global variables in order
to have the architecture to support multiple modems or the like.  Thus,
the buffer should actually be part of struct gsmd (or rather: Something
that is allocated and where a pointer member from struct gsmd points to)
- Harald Welte <laforge at openmoko.org>          	        http://openmoko.org/
Software for the world's first truly open Free Software mobile phone

More information about the gsmd-devel mailing list