Geo: fixed insertion of ranges specified in descending order.
This commit is contained in:
parent
f927ab882a
commit
20de5f14e5
@ -940,9 +940,14 @@ ngx_http_geo_add_range(ngx_conf_t *cf, ngx_http_geo_conf_ctx_t *ctx,
|
|||||||
return NGX_CONF_ERROR;
|
return NGX_CONF_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
range->start = (u_short) s;
|
range = a->elts;
|
||||||
range->end = (u_short) e;
|
|
||||||
range->value = ctx->value;
|
ngx_memmove(&range[1], &range[0],
|
||||||
|
(a->nelts - 1) * sizeof(ngx_http_geo_range_t));
|
||||||
|
|
||||||
|
range[0].start = (u_short) s;
|
||||||
|
range[0].end = (u_short) e;
|
||||||
|
range[0].value = ctx->value;
|
||||||
|
|
||||||
next:
|
next:
|
||||||
|
|
||||||
|
@ -890,9 +890,14 @@ ngx_stream_geo_add_range(ngx_conf_t *cf, ngx_stream_geo_conf_ctx_t *ctx,
|
|||||||
return NGX_CONF_ERROR;
|
return NGX_CONF_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
range->start = (u_short) s;
|
range = a->elts;
|
||||||
range->end = (u_short) e;
|
|
||||||
range->value = ctx->value;
|
ngx_memmove(&range[1], &range[0],
|
||||||
|
(a->nelts - 1) * sizeof(ngx_stream_geo_range_t));
|
||||||
|
|
||||||
|
range[0].start = (u_short) s;
|
||||||
|
range[0].end = (u_short) e;
|
||||||
|
range[0].value = ctx->value;
|
||||||
|
|
||||||
next:
|
next:
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user