Home | History | Annotate | Download | only in c-ares

Lines Matching full:nsort

95 static int sortlist_alloc(struct apattern **sortlist, int *nsort, struct apattern *pat);
101 static int config_sortlist(struct apattern **sortlist, int *nsort,
106 #define ARES_CONFIG_CHECK(x) (x->lookups && x->nsort > -1 && \
164 channel->nsort = -1;
402 if (channel->nsort) {
403 options->sortlist = malloc(channel->nsort * sizeof(struct apattern));
406 for (i = 0; i < channel->nsort; i++)
409 options->nsort = channel->nsort;
501 if ((optmask & ARES_OPT_SORTLIST) && (channel->nsort == -1) &&
502 (options->nsort>0)) {
503 channel->sortlist = malloc(options->nsort * sizeof(struct apattern));
506 for (i = 0; i < options->nsort; i++)
508 channel->nsort = options->nsort;
793 int status = -1, nservers = 0, nsort = 0;
995 channel->nsort == -1)
996 status = config_sortlist(&sortlist, &nsort, p);
1135 channel->nsort = nsort;
1239 if (channel->nsort == -1) {
1241 channel->nsort = 0;
1383 static int config_sortlist(struct apattern **sortlist, int *nsort,
1421 if (!sortlist_alloc(sortlist, nsort, &pat))
1431 if (!sortlist_alloc(sortlist, nsort, &pat))
1448 if (!sortlist_alloc(sortlist, nsort, &pat))
1633 static int sortlist_alloc(struct apattern **sortlist, int *nsort,
1637 newsort = realloc(*sortlist, (*nsort + 1) * sizeof(struct apattern));
1640 newsort[*nsort] = *pat;
1642 (*nsort)++;