Error in pjsip_tpmgr_receive_packet with SIP over TCPusing keep-alive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



FYI I've just fixed this in http://trac.pjsip.org/repos/ticket/482.
Thanks for the report!

cheers,
 -benny

On 2/15/08, Benny Prijono <bennylp at pjsip.org> wrote:
> Hi Helmut,
>
>  ah I see. I recalled that the parser should be able to skip leading
>  newlines, and it does (see int_parse_msg()), but I forgot about
>  pjsip_find_msg(). Let me fix this and come back to you asap.
>
>  thanks,
>
>  -benny
>
>
>  On 2/15/08, Helmut Wolf <HelmutWolf1 at gmx.de> wrote:
>  > Hi Benny,
>  >
>
> >  That's no problem. I see how many support requests are sended to you...
>  >
>  >  The configuration is pjsip to pjsip so keep-alive packet contains CRLF. It seems the problem is in pjsip_find_msg(). At the
>  >  beginning (Line 772 in sip_parser.c):
>  >
>  >  /* Find the end of header area by finding an empty line. */
>  >  pos = pj_ansi_strstr(buf, "\n\r\n");
>  >
>  >  If one keep-alive exist there is no problem ("\n\r\n" is found at the end of SIP msg, not in keep-alive "\r\n"). But when more than
>  >  one keep-alive exist than the problem occurs ("\n\r\n" is found in keep-alive "\r\n\r\n..."). Herewith no SIP header can be found
>  >  and PJSIP_EMISSINGHDR is returned.
>  >
>  >  If I correct understand the buffer does always begin with keep-alive or a SIP msg. If the msg is incomplete the first positions of
>  >  the buffer does not change. On next incoming packet it will be attached. Isn't it a solution to remove CRLF if found at the first
>  >  position in the buffer?
>  >
>  >  Best regards,
>  >  Helmut
>



[Index of Archives]     [Asterisk Users]     [Asterisk App Development]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [Linux API]
  Powered by Linux