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

Function pv_get_to_attr

pvar.c:1113–1129  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1111}
1112
1113static int pv_get_to_attr(struct sip_msg *msg, pv_param_t *param,
1114 pv_value_t *res)
1115{
1116 if(msg==NULL)
1117 return -1;
1118
1119 if(msg->to==NULL && parse_headers(msg, HDR_TO_F, 0)==-1)
1120 {
1121 LM_ERR("cannot parse To header\n");
1122 return pv_get_null(msg, param, res);
1123 }
1124 if(msg->to==NULL || get_to(msg)==NULL) {
1125 LM_DBG("no To header\n");
1126 return pv_get_null(msg, param, res);
1127 }
1128 return pv_get_xto_attr(msg, param, res, get_to(msg), 0);
1129}
1130
1131static int pv_get_from_attr(struct sip_msg *msg, pv_param_t *param,
1132 pv_value_t *res)

Callers

nothing calls this directly

Calls 2

pv_get_nullFunction · 0.85
pv_get_xto_attrFunction · 0.85

Tested by

no test coverage detected