diff options
author | Vsevolod Stakhov <vsevolod@rspamd.com> | 2023-12-10 18:58:20 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-12-10 18:58:20 +0000 |
commit | 202c586ce763a3696b6526c0ddfce3dee76ea879 (patch) | |
tree | 3bd9febebeeff50fea494e28cf0b4cda5b9c9f60 /src/libserver | |
parent | 633ec3d7b64e3eac7c99af14530bb00cf397c106 (diff) | |
parent | b11f8216f0db7a79b13b83b39e6a6ab1e7bad108 (diff) | |
download | rspamd-202c586ce763a3696b6526c0ddfce3dee76ea879.tar.gz rspamd-202c586ce763a3696b6526c0ddfce3dee76ea879.zip |
Merge pull request #4718 from rspamd/vstakhov-bayes-rework
Migrate bayes redis backend to Lua scripts
Diffstat (limited to 'src/libserver')
-rw-r--r-- | src/libserver/redis_pool.cxx | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/libserver/redis_pool.cxx b/src/libserver/redis_pool.cxx index a74eafd48..9c2d6cf6d 100644 --- a/src/libserver/redis_pool.cxx +++ b/src/libserver/redis_pool.cxx @@ -1,11 +1,11 @@ -/*- - * Copyright 2016 Vsevolod Stakhov +/* + * Copyright 2023 Vsevolod Stakhov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -113,7 +113,7 @@ public: if (_db) { db = _db; } - if( _username ) { + if (_username) { username = _username; } if (_password) { @@ -418,7 +418,7 @@ redis_pool_connection::redis_pool_connection(redis_pool *_pool, pool->register_context(ctx, this); ctx->data = this; memset(tag, 0, sizeof(tag)); - rspamd_random_hex((guchar *) tag, sizeof(tag) - 1); + rspamd_random_hex(tag, sizeof(tag) - 1); redisLibevAttach(pool->event_loop, ctx); redisAsyncSetDisconnectCallback(ctx, redis_pool_connection::redis_on_disconnect); @@ -426,7 +426,7 @@ redis_pool_connection::redis_pool_connection(redis_pool *_pool, if (!username.empty()) { if (!password.empty()) { redisAsyncCommand(ctx, nullptr, nullptr, - "AUTH %s %s", username.c_str(), password.c_str()); + "AUTH %s %s", username.c_str(), password.c_str()); } else { msg_warn("Redis requires a password when username is supplied"); |