[Asterisk-Dev] IAX2 Spec?
Derek Smithies
derek at indranet.co.nz
Fri Apr 8 17:10:27 MST 2005
Hi,
> >So - what guideline did you find that suggests a 1300 line function?
> I don't quite understand your question.
Ok, let me summarize it for you.
Statements I have seen about iax2 and the code:
The missing parts of the protocol documentation can be deduced from the code
You can work out the protocol from the code.
===============================
Such reverse engineering is not easy, when the code is poorly written.
A 1300 line method is an abomination to understand.
My question about guidelines is, very simply, a subtle way of saying the
code is very very hard to read and understand.
The code is easier to understand if you know the protocol, and know the
workings of the PBX side of asterisk.
However, let us stop squabbling over the code quality. let us move on to
bigger and better things, like how do we obtain correct and complete
documentation. Perhaps, the source for the current rfc could be placed in
CVS. (presumably the source for the rfc is text format - latex?)
Derek.
========================================================================
On Fri, 8 Apr 2005, Steve Kann wrote:
> Derek Smithies wrote:
>
> >On Fri, 8 Apr 2005, Steve Kann wrote:
> >
> >
> >>It's fun, especially when the receive side is mostly implemented in one
> >>1300 line function (socket_read()) :)
> >>
> >>
> >>
> >So - what guideline did you find that suggests a 1300 line function?
> >
> >
>
> I don't quite understand your question. I didn't find any guidelines; I
> just loaded chan_iax2.c into vi, went to the first brace after
> socket_read(), pressed "%", and noted the difference between the two
> line numbers.
>
> >1300 line function - that is readable yes, but the people at obfuscated C
> >competitions will tell you that all code "is readable".
> >
--
Derek Smithies Ph.D.
IndraNet Technologies Ltd.
Email: derek at indranet.co.nz
ph +64 3 365 6485
Web: http://www.indranet-technologies.com/
More information about the asterisk-dev
mailing list