| 4060 | } |
| 4061 | |
| 4062 | static int |
| 4063 | rtpengine_offer_answer(struct sip_msg *msg, str *flags, str *node, |
| 4064 | pv_spec_t *spvar, pv_spec_t *bpvar, str *body, int op) |
| 4065 | { |
| 4066 | str newbody; |
| 4067 | pv_value_t val; |
| 4068 | int ret = rtpengine_offer_answer_body(msg, flags, node, |
| 4069 | spvar, body, (bpvar?&newbody:NULL), NULL, op); |
| 4070 | if (ret < 0) |
| 4071 | return -1; |
| 4072 | /* if we have a variable to store into, use it */ |
| 4073 | if (bpvar) { |
| 4074 | memset(&val, 0, sizeof(pv_value_t)); |
| 4075 | val.flags = PV_VAL_STR; |
| 4076 | val.rs = newbody; |
| 4077 | if(pv_set_value(msg, bpvar, (int)EQ_T, &val)<0) |
| 4078 | LM_ERR("setting PV failed\n"); |
| 4079 | pkg_free(newbody.s); |
| 4080 | } |
| 4081 | return ret; |
| 4082 | } |
| 4083 | |
| 4084 | |
| 4085 | static int |
no test coverage detected