Loading plugins/media/media.cpp +1 −1 Original line number Original line Diff line number Diff line Loading @@ -513,7 +513,7 @@ namespace blogi { try{ try{ std::string value; std::string value; _store->load(suuid,value); _store->load(suuid,value); curres.send(curcon, value.c_str(), value.size()); curres.send(curcon, value.c_str(), value.length()); }catch(...){ }catch(...){ curres.setState(HTTP404); curres.setState(HTTP404); curres.send(curcon,nullptr,0); curres.send(curcon,nullptr,0); Loading plugins/media/redis.cpp +7 −4 Original line number Original line Diff line number Diff line Loading @@ -25,6 +25,8 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. *******************************************************************************/ *******************************************************************************/ #include <iostream> #include <httppp/exception.h> #include <httppp/exception.h> #include "backend.h" #include "backend.h" Loading Loading @@ -60,12 +62,13 @@ REDISSAVE: } } void blogi::RedisStore::load(const std::string key,std::string &value) { void blogi::RedisStore::load(const std::string key,std::string &value) { std::cout << "test" << std::endl; REDISLOAD: REDISLOAD: redisReply* reply = (redisReply*) redisCommand(_RedisCTX, "GET %s",key.c_str()); redisReply* reply = (redisReply*) redisCommand(_RedisCTX, "GET %s",key.c_str()); if(reply->str){ std::cout << reply->len << std::endl; value.clear(); if(reply->len>0){ value.resize(reply->len); value.resize(reply->len); value.append(reply->str,reply->len); value.insert(0,reply->str,reply->len); }else{ }else{ if(reconnect()) if(reconnect()) goto REDISLOAD; goto REDISLOAD; Loading plugins/media/backend.h +1 −1 File changed.Contains only whitespace changes. Show changes Loading
plugins/media/media.cpp +1 −1 Original line number Original line Diff line number Diff line Loading @@ -513,7 +513,7 @@ namespace blogi { try{ try{ std::string value; std::string value; _store->load(suuid,value); _store->load(suuid,value); curres.send(curcon, value.c_str(), value.size()); curres.send(curcon, value.c_str(), value.length()); }catch(...){ }catch(...){ curres.setState(HTTP404); curres.setState(HTTP404); curres.send(curcon,nullptr,0); curres.send(curcon,nullptr,0); Loading
plugins/media/redis.cpp +7 −4 Original line number Original line Diff line number Diff line Loading @@ -25,6 +25,8 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. *******************************************************************************/ *******************************************************************************/ #include <iostream> #include <httppp/exception.h> #include <httppp/exception.h> #include "backend.h" #include "backend.h" Loading Loading @@ -60,12 +62,13 @@ REDISSAVE: } } void blogi::RedisStore::load(const std::string key,std::string &value) { void blogi::RedisStore::load(const std::string key,std::string &value) { std::cout << "test" << std::endl; REDISLOAD: REDISLOAD: redisReply* reply = (redisReply*) redisCommand(_RedisCTX, "GET %s",key.c_str()); redisReply* reply = (redisReply*) redisCommand(_RedisCTX, "GET %s",key.c_str()); if(reply->str){ std::cout << reply->len << std::endl; value.clear(); if(reply->len>0){ value.resize(reply->len); value.resize(reply->len); value.append(reply->str,reply->len); value.insert(0,reply->str,reply->len); }else{ }else{ if(reconnect()) if(reconnect()) goto REDISLOAD; goto REDISLOAD; Loading