MCPcopy Create free account
hub / github.com/SIPp/sipp / get_header_field_code

Method get_header_field_code

src/call.cpp:1521–1538  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1519}
1520
1521char * call::get_header_field_code(const char *msg, const char * name)
1522{
1523 static char code[MAX_HEADER_LEN];
1524 const char * last_header;
1525 int i;
1526
1527 last_header = nullptr;
1528 i = 0;
1529 /* If we find the field in msg */
1530 last_header = get_header_content(msg, name);
1531 if(last_header) {
1532 /* Extract the integer value of the field */
1533 while(isspace(*last_header)) last_header++;
1534 sscanf(last_header, "%d", &i);
1535 sprintf(code, "%s %d", name, i);
1536 }
1537 return code;
1538}
1539
1540char * call::get_last_header(const char * name)
1541{

Callers

nothing calls this directly

Calls 1

get_header_contentFunction · 0.85

Tested by

no test coverage detected