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

Function run_transformations

transformations.c:157–182  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

155}
156
157int run_transformations(struct sip_msg *msg, trans_t *tr, pv_value_t *val)
158{
159 trans_t *it;
160 int ret = 0;
161
162 if (tr==NULL || val==NULL) {
163 LM_DBG("null pointer\n");
164 ret = -1;
165 goto out;
166 }
167
168 it = tr;
169 while (it) {
170 ret = (*it->trf)(msg, it->params, it->subtype, val);
171 if(ret!=0)
172 goto out;
173 it = it->next;
174 }
175
176out:
177 /* advancing the current set of buffers avoids buffer overruns when passing
178 * multiple transformation-enabled vars as cfg function parameters */
179 __crt_tr_bufs = (__crt_tr_bufs + 1) % (MAX_ACTION_ELEMS - 1);
180
181 return ret;
182}
183
184static void trans_fill_left(pv_value_t *val, str pad, int len, char *_tr_buffer)
185{

Callers 1

pv_get_spec_valueFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected