* Function that jumps over the first row of the message * with the received buffer and saves a pointer in the first * arg to the first row along with the length */
| 503 | * arg to the first row along with the length |
| 504 | */ |
| 505 | static int mc_parse_first_line(str* msg_start, char** buffer) |
| 506 | { |
| 507 | char* buf = *buffer; |
| 508 | int len=0; |
| 509 | |
| 510 | msg_start->s = buf; |
| 511 | msg_start->len = 0; |
| 512 | |
| 513 | /* Jump over initial row of the message */ |
| 514 | do { |
| 515 | len++; |
| 516 | } while (*(buf+len) != '\n'); |
| 517 | len++; |
| 518 | |
| 519 | msg_start->len = len; |
| 520 | *buffer = buf+len; |
| 521 | |
| 522 | return 0; |
| 523 | } |
| 524 | |
| 525 | /* |
| 526 | *Function that checks if header is in whitelist |
no outgoing calls
no test coverage detected