| 2848 | }while(0) \ |
| 2849 | |
| 2850 | static inline int get_pgwl_params(struct dr_sort_params *dsp, |
| 2851 | pgw_list_t **pgwl, int *size, unsigned short **sorted_dst) |
| 2852 | { |
| 2853 | if (dsp->dst_idx == (unsigned short)-1) { |
| 2854 | *pgwl = dsp->dr_rule->pgwl; |
| 2855 | *size = dsp->dr_rule->pgwa_len; |
| 2856 | } else { /* it is a carrier */ |
| 2857 | if (dsp->dst_idx >= 0 && dsp->dst_idx < dsp->dr_rule->pgwa_len) { |
| 2858 | if (dsp->dr_rule->pgwl[dsp->dst_idx].is_carrier) { |
| 2859 | *pgwl = dsp->dr_rule->pgwl[dsp->dst_idx].dst.carrier->pgwl; |
| 2860 | *size = dsp->dr_rule->pgwl[dsp->dst_idx].dst.carrier->pgwa_len; |
| 2861 | } else { |
| 2862 | LM_WARN("provided destination for sorting is not a carrier\n"); |
| 2863 | return -1; |
| 2864 | } |
| 2865 | } else { |
| 2866 | LM_WARN("no destination with this id (%d)\n", dsp->dst_idx); |
| 2867 | return -1; |
| 2868 | } |
| 2869 | } |
| 2870 | |
| 2871 | *sorted_dst = dsp->sorted_dst; |
| 2872 | return 0; |
| 2873 | } |
| 2874 | |
| 2875 | #define DR_MAX_GWLIST 64 |
| 2876 |
no outgoing calls
no test coverage detected