MCPcopy Create free account
hub / github.com/OpenSIPS/opensips / eat_line

Function eat_line

parser/parser_f.c:28–41  ·  view source on GitHub ↗

returns pointer to next line or after the end of buffer */

Source from the content-addressed store, hash-verified

26
27/* returns pointer to next line or after the end of buffer */
28char* eat_line(char* buffer, unsigned int len)
29{
30 char* nl;
31
32 /* jku .. replace for search with a library function; not conforming
33 as I do not care about CR
34 */
35 nl=(char *)q_memchr( buffer, '\n', len );
36 if ( nl ) {
37 if ( nl + 1 < buffer+len) nl++;
38 if (( nl+1<buffer+len) && * nl=='\r') nl++;
39 } else nl=buffer+len;
40 return nl;
41}
42

Callers 10

extract_mediainfoFunction · 0.85
extract_parsed_hdrsFunction · 0.85
parse_first_lineFunction · 0.85
extract_rtpmapFunction · 0.85
extract_custom_a_attrFunction · 0.85
extract_fmtpFunction · 0.85
extract_fieldFunction · 0.85
extract_bwidthFunction · 0.85
extract_mediaipFunction · 0.85
extract_media_attrFunction · 0.85

Calls 1

q_memchrFunction · 0.85

Tested by

no test coverage detected