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