| 850 | } |
| 851 | |
| 852 | static inline struct rtpe_ctx *rtpe_ctx_get(void) |
| 853 | { |
| 854 | struct rtpe_ctx *ctx = rtpe_ctx_tryget(); |
| 855 | if (!ctx) { |
| 856 | if (!current_processing_ctx) { |
| 857 | LM_ERR("no processing ctx found - cannot use rtpengine context!\n"); |
| 858 | return NULL; |
| 859 | } |
| 860 | ctx = pkg_malloc(sizeof(*ctx)); |
| 861 | if (!ctx) { |
| 862 | LM_ERR("not enough pkg memory!\n"); |
| 863 | return NULL; |
| 864 | } |
| 865 | memset(ctx, 0, sizeof(*ctx)); |
| 866 | rtpe_ctx_set(ctx); |
| 867 | } |
| 868 | return ctx; |
| 869 | } |
| 870 | |
| 871 | static inline void rtpe_ctx_set_fill(struct rtpe_set *set) |
| 872 | { |
no outgoing calls
no test coverage detected