| 356 | } |
| 357 | |
| 358 | static inline void call_transfer_raise(struct dlg_cell *dlg, str *callid, str *ruri, |
| 359 | str *state, str *status) |
| 360 | { |
| 361 | /* XXX: old leg is caller or callee, so it should be safe to use a buffer |
| 362 | * of 6 bytes */ |
| 363 | char buf[sizeof("caller")]; |
| 364 | int_str old_leg; |
| 365 | int val_type; |
| 366 | |
| 367 | old_leg.s = str_init(buf); |
| 368 | |
| 369 | if (call_dlg_api.fetch_dlg_value(dlg, &call_transfer_param, &val_type, |
| 370 | &old_leg, 1) < 0) |
| 371 | init_str(&old_leg.s, "unknown"); |
| 372 | |
| 373 | RAISE_CALL_EVENT(TRANSFER, &dlg->callid, &old_leg.s, |
| 374 | callid, ruri, state, status, NULL); |
| 375 | } |
| 376 | |
| 377 | static void call_transfer_reply(struct cell *t, int type, struct tmcb_params *ps) |
| 378 | { |
no test coverage detected