I know that some latest patch are been reverted from 4.4 trunk.
I was curious to know if this part of a reverted patch can be
considered still valid for sipXtackLib:
674 - if ((res == 2 &&
675 - readBuffer(0) == '\r' && readBuffer(1) == '\n')
||
676 - (res == 4 &&
677 - readBuffer(0) == '\r' && readBuffer(1) == '\n' &&
678 - readBuffer(2) == '\r' && readBuffer(3) == '\n'))
675 + //
676 + // Count the CRLF sequence and see if the entire
buffer is composed of it
677 + //
678 + int crlfCount = 0;
679 + for (int i = 0; i < res; i+=2)
680 + {
681 + if (readBuffer(i) == '\r' && readBuffer(i) == '\n')
682 + crlfCount+=2;
683 + else
684 + break;
685 + }
686 +
687 + if (crlfCount == res)
679 688 {
thanks
Domenico Chierico
_______________________________________________
sipx-dev mailing list
[email protected]
List Archive: http://list.sipfoundry.org/archive/sipx-dev/