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

Method extract_cseq_method

src/call.cpp:4304–4325  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4302
4303
4304void call::extract_cseq_method(char* method, const char* msg)
4305{
4306 const char* cseq;
4307 if ((cseq = strstr (msg, "CSeq"))) {
4308 const char* value;
4309 if ((value = strchr(cseq, ':'))) {
4310 value++;
4311 while (isspace(*value)) value++; // ignore any white spaces after the :
4312 while (!isspace(*value)) value++; // ignore the CSEQ number
4313 while (isspace(*value)) value++; // ignore spaces after CSEQ number
4314 const char* end = value;
4315 int nbytes = 0;
4316 /* A '\r' terminates the line, so we want to catch that too. */
4317 while ((*end != '\r') && (*end != '\n')) {
4318 end++;
4319 nbytes++;
4320 }
4321 if (nbytes > 0) strncpy (method, value, nbytes);
4322 method[nbytes] = '\0';
4323 }
4324 }
4325}
4326
4327void call::extract_transaction(char* txn, const char* msg)
4328{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected