Loading plugins/media/backend.h +1 −1 Original line number Diff line number Diff line Loading @@ -49,7 +49,7 @@ namespace blogi { class RedisStore : public Store { public: RedisStore(const char *host,int port,const char *password=nullptr,int threads=0); RedisStore(const char *host,int port,const char *password,int timeout,int threads=0); ~RedisStore(); size_t getSize(int tid,const char *key) override; Loading plugins/media/media.cpp +4 −2 Original line number Diff line number Diff line Loading @@ -495,9 +495,11 @@ namespace blogi { Args->edit->addIcon(icondata,icondatalen,"selimage","webp","Insert Image from media albums"); if(Args->config->getRedisPassword()){ _store = new RedisStore(Args->config->getRedisHost(),Args->config->getRedisPort(),Args->config->getRedisPassword(),Args->maxthreads); _store = new RedisStore(Args->config->getRedisHost(),Args->config->getRedisPort(), Args->config->getRedisPassword(),Args->config->getRedisTimeout(),Args->maxthreads); }else{ _store = new RedisStore(Args->config->getRedisHost(),Args->config->getRedisPort(),nullptr,Args->maxthreads); _store = new RedisStore(Args->config->getRedisHost(),Args->config->getRedisPort(), nullptr,Args->config->getRedisTimeout(),Args->maxthreads); } } Loading plugins/media/redis.cpp +5 −2 Original line number Diff line number Diff line Loading @@ -34,11 +34,14 @@ #include "backend.h" blogi::RedisStore::RedisStore(const char *host,int port,const char *password,int threads){ blogi::RedisStore::RedisStore(const char *host,int port,const char *password,int timeout,int threads){ _Threads=threads; _RedisCTX=new struct redisContext*[_Threads]; for(int i = 0; i<=_Threads; ++i){ _RedisCTX[i]=redisConnect(host,port); struct timeval tv={0,timeout}; _RedisCTX[i]=redisConnectWithTimeout(host,port,tv); if (_RedisCTX[i]->err) { libhttppp::HTTPException exp; Loading Loading
plugins/media/backend.h +1 −1 Original line number Diff line number Diff line Loading @@ -49,7 +49,7 @@ namespace blogi { class RedisStore : public Store { public: RedisStore(const char *host,int port,const char *password=nullptr,int threads=0); RedisStore(const char *host,int port,const char *password,int timeout,int threads=0); ~RedisStore(); size_t getSize(int tid,const char *key) override; Loading
plugins/media/media.cpp +4 −2 Original line number Diff line number Diff line Loading @@ -495,9 +495,11 @@ namespace blogi { Args->edit->addIcon(icondata,icondatalen,"selimage","webp","Insert Image from media albums"); if(Args->config->getRedisPassword()){ _store = new RedisStore(Args->config->getRedisHost(),Args->config->getRedisPort(),Args->config->getRedisPassword(),Args->maxthreads); _store = new RedisStore(Args->config->getRedisHost(),Args->config->getRedisPort(), Args->config->getRedisPassword(),Args->config->getRedisTimeout(),Args->maxthreads); }else{ _store = new RedisStore(Args->config->getRedisHost(),Args->config->getRedisPort(),nullptr,Args->maxthreads); _store = new RedisStore(Args->config->getRedisHost(),Args->config->getRedisPort(), nullptr,Args->config->getRedisTimeout(),Args->maxthreads); } } Loading
plugins/media/redis.cpp +5 −2 Original line number Diff line number Diff line Loading @@ -34,11 +34,14 @@ #include "backend.h" blogi::RedisStore::RedisStore(const char *host,int port,const char *password,int threads){ blogi::RedisStore::RedisStore(const char *host,int port,const char *password,int timeout,int threads){ _Threads=threads; _RedisCTX=new struct redisContext*[_Threads]; for(int i = 0; i<=_Threads; ++i){ _RedisCTX[i]=redisConnect(host,port); struct timeval tv={0,timeout}; _RedisCTX[i]=redisConnectWithTimeout(host,port,tv); if (_RedisCTX[i]->err) { libhttppp::HTTPException exp; Loading