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

Method checkInternalCmd

src/call.cpp:4225–4264  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4223}
4224
4225bool call::checkInternalCmd(char * cmd)
4226{
4227
4228 char * L_ptr1, * L_ptr2, L_backup;
4229
4230 L_ptr1 = strstr(cmd, "internal-cmd:");
4231 if (!L_ptr1) {
4232 return (false);
4233 }
4234 L_ptr1 += 13 ;
4235 while((*L_ptr1 == ' ') || (*L_ptr1 == '\t')) {
4236 L_ptr1++;
4237 }
4238 if (!(*L_ptr1)) {
4239 return (false);
4240 }
4241 L_ptr2 = L_ptr1;
4242 while((*L_ptr2) &&
4243 (*L_ptr2 != ' ') &&
4244 (*L_ptr2 != '\t') &&
4245 (*L_ptr2 != '\r') &&
4246 (*L_ptr2 != '\n')) {
4247 L_ptr2 ++;
4248 }
4249 if(!*L_ptr2) {
4250 return (false);
4251 }
4252 L_backup = *L_ptr2;
4253 *L_ptr2 = 0;
4254
4255 if (strcmp(L_ptr1, "abort_call") == 0) {
4256 *L_ptr2 = L_backup;
4257 computeStat(CStat::E_CALL_FAILED);
4258 abortCall(true);
4259 return (true);
4260 }
4261
4262 *L_ptr2 = L_backup;
4263 return (false);
4264}
4265
4266bool call::check_peer_src(char * msg, int search_index)
4267{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected