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

Function internal_find_param

src/sip_parser.cpp:505–529  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

503}
504
505static const char* internal_find_param(const char* ptr, const char* name)
506{
507 int namelen = strlen(name);
508
509 while (1) {
510 ptr = internal_hdrchr(ptr, ';');
511 if (!ptr) {
512 return nullptr;
513 }
514 ++ptr;
515
516 ptr = internal_skip_lws(ptr);
517 if (!ptr || !*ptr) {
518 return nullptr;
519 }
520
521 /* Case insensitive, see RFC 3261 7.3.1 notes above. */
522 if (strncasecmp(ptr, name, namelen) == 0 && *(ptr + namelen) == '=') {
523 ptr += namelen + 1;
524 return ptr;
525 }
526 }
527
528 return nullptr; /* never gets here */
529}
530
531static const char* internal_skip_lws(const char* ptr)
532{

Callers 1

get_peer_tagFunction · 0.85

Calls 2

internal_hdrchrFunction · 0.85
internal_skip_lwsFunction · 0.85

Tested by

no test coverage detected