Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: Castaglia/proftpd-mod_proxy
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: master
Choose a base ref
...
head repository: 000webhost/proftpd-mod_proxy
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref
Able to merge. These branches can be automatically merged.
  • 2 commits
  • 1 file changed
  • 1 contributor

Commits on Nov 20, 2018

  1. Return auth error instead of selecting last used backend from Redis

    Signed-off-by: Donatas Abraitis <[email protected]>
    ton31337 committed Nov 20, 2018
    Copy the full SHA
    47693cf View commit details

Commits on Sep 24, 2019

  1. Merge pull request #1 from 000webhost/fix/return_instead_of_selecting…

    …_random_backend
    
    Return auth error instead of selecting last used backend from Redis
    ton31337 authored Sep 24, 2019
    Copy the full SHA
    379937e View commit details
Showing with 8 additions and 3 deletions.
  1. +8 −3 lib/proxy/reverse/redis.c
11 changes: 8 additions & 3 deletions lib/proxy/reverse/redis.c
Original file line number Diff line number Diff line change
@@ -116,6 +116,11 @@ static array_header *redis_get_list_backend_uris(pool *p,
pool *tmp_pool;
char *key;
array_header *backend_uris, *values = NULL, *valueszs = NULL;
array_header *backend = NULL;

backend = proxy_reverse_pername_backends(p, name, TRUE);
if (backend == NULL)
return NULL;

tmp_pool = make_sub_pool(p);
key = make_key(tmp_pool, policy, vhost_id, name);
@@ -274,7 +279,7 @@ static long reverse_redis_shuffle_next(pool *p, pr_redis_t *redis,

count = 0;
}

if (count == 0) {
res = reverse_redis_shuffle_init(p, redis, vhost_id, redis_backends);
xerrno = errno;
@@ -985,7 +990,7 @@ static const struct proxy_conn *reverse_redis_policy_next_backend(pool *p,
pr_netaddr_get_ipstr(session.c->remote_addr));
}
break;

default:
errno = ENOSYS;
return NULL;
@@ -1115,7 +1120,7 @@ static void *reverse_redis_init(pool *p, const char *tables_path, int flags) {
}

(void) pr_redis_conn_set_namespace(redis, &proxy_module, redis_prefix,
redis_prefixsz);
redis_prefixsz);
return redis;
}