| 60 | } |
| 61 | |
| 62 | void |
| 63 | msg_callback_process(struct sip_msg *msg, cb_type_t cb_type, void *core_arg) |
| 64 | { |
| 65 | struct msg_callback *msg_cb; |
| 66 | struct msg_callback *msg_cb_pre; |
| 67 | |
| 68 | for (msg_cb = msg->msg_cb; msg_cb != NULL; msg_cb = msg_cb->next) { |
| 69 | if (msg_cb->cb_type != cb_type) { |
| 70 | continue; |
| 71 | } |
| 72 | /* Execute callback */ |
| 73 | msg_cb->cb_func(msg, cb_type, msg_cb->cb_arg, core_arg); |
| 74 | } |
| 75 | if (cb_type != MSG_DESTROY) |
| 76 | return; |
| 77 | for (msg_cb_pre = msg->msg_cb; msg_cb_pre != NULL; msg_cb_pre = msg_cb) { |
| 78 | msg_cb = msg_cb_pre->next; |
| 79 | pkg_free(msg_cb_pre); |
| 80 | } |
| 81 | msg->msg_cb = NULL; |
| 82 | } |
| 83 | |
| 84 | int |
| 85 | msg_callback_check(struct sip_msg *msg, cb_type_t cb_type, cb_func_t cb_func) |
no outgoing calls
no test coverage detected