MCPcopy Create free account
hub / github.com/OpenSIPS/opensips / pv_get_method

Function pv_get_method

pvar.c:566–589  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

564}
565
566static int pv_get_method(struct sip_msg *msg, pv_param_t *param,
567 pv_value_t *res)
568{
569 if(msg==NULL)
570 return -1;
571
572 if(msg->first_line.type == SIP_REQUEST)
573 {
574 return pv_get_strintval(msg, param, res,
575 &msg->first_line.u.request.method,
576 (int)msg->first_line.u.request.method_value);
577 }
578
579 if(msg->cseq==NULL && ((parse_headers(msg, HDR_CSEQ_F, 0)==-1) ||
580 (msg->cseq==NULL)))
581 {
582 LM_ERR("no CSEQ header\n");
583 return pv_get_null(msg, param, res);
584 }
585
586 return pv_get_strintval(msg, param, res,
587 &get_cseq(msg)->method,
588 get_cseq(msg)->method_id);
589}
590
591static int pv_get_status(struct sip_msg *msg, pv_param_t *param,
592 pv_value_t *res)

Callers

nothing calls this directly

Calls 2

pv_get_strintvalFunction · 0.85
pv_get_nullFunction · 0.85

Tested by

no test coverage detected