| 1519 | } |
| 1520 | |
| 1521 | char * 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 | |
| 1540 | char * call::get_last_header(const char * name) |
| 1541 | { |
nothing calls this directly
no test coverage detected