On 3/11/13 9:36 AM, Juha Heinanen wrote:
Daniel-Constantin Mierla writes:
Try with latest master or 4.0 branch and let me
know if it is ok now.
i'm building new package right now and will tell soon if
is works.
Btw, to be more clear, the "-1"in
sizeof() is removing ending '\0' from
the defined buffer.
VERY confusing and very BAD programming practice that should
not be
admitted to kamailio sources. MAXFWD_HEADER_LEN should be what it says
and not something else. i suggest reverting the whole original commit
and redoing it properly in master.
hmm, what you mean?!? it is what it says, the
length of max forward
define, it is not the size of the buffer that stores it. Look over the
rest of the code in core and modules, this approach is everywhere (e.g.,
check the define of CRLF_LEN). Otherwise, it has to be used strlen() at
runtime, computing every time the length. SO before throwing crappy
statements, try to figure out what is all about.
The patch was contributed by external person and I applied, solving
exiting issues with sip devices rejecting requests without maxfwd. The
problem was not with the value of max forward len.
Daniel
--
Daniel-Constantin Mierla -
http://www.asipto.com
http://twitter.com/#!/miconda -
http://www.linkedin.com/in/miconda
Kamailio World Conference, April 16-17, 2013, Berlin
-
http://conference.kamailio.com -