preserve the order of the destinations */
| 2915 | |
| 2916 | /* preserve the order of the destinations */ |
| 2917 | static void no_sort_cb(void *params) |
| 2918 | { |
| 2919 | struct dr_sort_params *dsp = (struct dr_sort_params *)params; |
| 2920 | int i = 0; |
| 2921 | unsigned short *sorted_dst = NULL; |
| 2922 | int size = 0; |
| 2923 | pgw_list_t *pgwl = NULL; |
| 2924 | int rc = 0; |
| 2925 | |
| 2926 | rc = get_pgwl_params(dsp, &pgwl, &size, &sorted_dst); |
| 2927 | if (rc < 0) { |
| 2928 | LM_ERR("failed to sort\n"); |
| 2929 | dsp->rc = -1; |
| 2930 | return; |
| 2931 | } |
| 2932 | |
| 2933 | for (i = 0; i < size; i++) |
| 2934 | sorted_dst[i] = i; |
| 2935 | |
| 2936 | dsp->rc = 0; /* everything ok */ |
| 2937 | } |
| 2938 | |
| 2939 | /* sort based on the weight of the gws */ |
| 2940 | static void weight_based_sort_cb(void *params) |
nothing calls this directly
no test coverage detected