Skip to content

Commit

Permalink
0.7.0 release candidate
Browse files Browse the repository at this point in the history
  • Loading branch information
topilski committed Feb 28, 2015
1 parent ceba514 commit 69cbd14
Show file tree
Hide file tree
Showing 12 changed files with 28 additions and 9 deletions.
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
CMAKE_MINIMUM_REQUIRED(VERSION 3.0.0)
#############################################################
PROJECT("FastoRedis" VERSION 0.7.0.1 LANGUAGES CXX C)
PROJECT("FastoRedis" VERSION 0.7.0.0 LANGUAGES CXX C)
#################### Project Settings ####################
#SET(PROJECT_NAME "FastoRedis" CACHE STRING "Project Name")
SET(PROJECT_NAME_TITLE ${PROJECT_NAME} CACHE STRING "Title for ${PROJECT_NAME}")
Expand All @@ -12,7 +12,7 @@ SET(PROJECT_MAINTAINER_MAIL "[email protected]" CACHE STRING "Internet ma
SET(PROJECT_MAINTAINER_NAME "Alexandr Topilski" CACHE STRING "Name of ${PROJECT_NAME} mainteiner")
SET(PROJECT_GITHUB_FORK "www.github.com/fasto/fastoredis" CACHE STRING "Git fork of ${PROJECT_NAME}")
SET(PROJECT_GITHUB_ISSUES "www.github.com/fasto/fastoredis/issues" CACHE STRING "Git issue link for ${PROJECT_NAME}")
SET(PROJECT_BUILD_TYPE "beta") #alfa, beta, rc, release
SET(PROJECT_BUILD_TYPE "rc") #alfa, beta, rc, release
##########################################################

STRING(TOLOWER ${PROJECT_NAME} PROJECT_NAME_LOWERCASE)
Expand Down
4 changes: 2 additions & 2 deletions src/core/idriver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ struct WinsockInit {

common::buffer_type cstamp = stamp;

if(cstamp[cstamp.size()-1] == '\n'){
cstamp.resize(cstamp.size()-1);
if(cstamp[cstamp.size() - 1] == '\n'){
cstamp.resize(cstamp.size() - 1);
}

timeOut = common::convertFromString<common::time64_t>((const char*)(cstamp.c_str() + 1));
Expand Down
2 changes: 1 addition & 1 deletion src/core/memcached/memcached_driver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -776,7 +776,7 @@ namespace fastoredis
strncpy(command, inputLine + offset, n - offset);
}
offset = n + 1;
FastoObjectCommand* cmd = createCommand(outRoot, command, common::Value::C_USER);
FastoObjectCommand* cmd = createCommand(outRoot, stableCommand(command), common::Value::C_USER);
er = impl_->execute(cmd);
if(er){
res.setErrorInfo(er);
Expand Down
3 changes: 2 additions & 1 deletion src/core/redis/redis_driver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2060,8 +2060,9 @@ namespace fastoredis
else{
strncpy(command, inputLine + offset, n - offset);
}

offset = n + 1;
RedisCommand* cmd = createCommand(outRoot, command, common::Value::C_USER);
RedisCommand* cmd = createCommand(outRoot, stableCommand(command), common::Value::C_USER);
er = impl_->execute(cmd);
if(er){
res.setErrorInfo(er);
Expand Down
2 changes: 1 addition & 1 deletion src/core/ssdb/ssdb_driver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1463,7 +1463,7 @@ namespace fastoredis
strncpy(command, inputLine + offset, n - offset);
}
offset = n + 1;
FastoObjectCommand* cmd = createCommand(outRoot, command, common::Value::C_USER);
FastoObjectCommand* cmd = createCommand(outRoot, stableCommand(command), common::Value::C_USER);
er = impl_->execute(cmd);
if(er){
res.setErrorInfo(er);
Expand Down
15 changes: 15 additions & 0 deletions src/global/global.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,21 @@ namespace fastoredis

}

std::string stableCommand(const char* command)
{
if(!command){
return std::string();
}

std::string cmd = command;

if(cmd[cmd.size() - 1] == '\r'){
cmd.resize(cmd.size() - 1);
}

return cmd;
}

std::pair<std::string, std::string> getKeyValueFromLine(const std::string& input)
{
if(input.empty()){
Expand Down
2 changes: 2 additions & 0 deletions src/global/global.h
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@ namespace fastoredis
FastoObjectCommand(FastoObject* parent, common::CommandValue* cmd, const std::string &delemitr);
};

std::string stableCommand(const char* command);

std::pair<std::string, std::string> getKeyValueFromLine(const std::string& input);
std::string getOppositeCommand(const std::string& command, const std::vector<std::pair<std::string, std::string > >& srcOppositeCommands);

Expand Down
3 changes: 2 additions & 1 deletion src/gui/widgets/commands_widget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@ namespace fastoredis
{
QTime time = QTime::currentTime();
logTextEdit_->setTextColor(command.type() == common::Value::C_INNER ? QColor(Qt::gray):QColor(Qt::black));
logTextEdit_->append(time.toString("h:mm:ss AP: ") + common::convertFromString<QString>(command.message()));
QString mess = common::convertFromString<QString>(command.message());
logTextEdit_->append(time.toString("h:mm:ss AP: ") + mess);
QScrollBar *sb = logTextEdit_->verticalScrollBar();
sb->setValue(sb->maximum());
}
Expand Down
Binary file added src/resources/fastoredis/images/128x128/ssdb.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/resources/fastoredis/images/256x256/ssdb.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/resources/fastoredis/images/64x64/ssdb.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion src/shell/shell_widget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ namespace fastoredis
}
else if(type == SSDB){
input_ = new SsdbShell;
setToolTip(tr("Based on libmemcached version: %1").arg(input_->version()));
setToolTip(tr("Based on ssdb-cli version: %1").arg(input_->version()));
}
else{
NOTREACHED();
Expand Down

0 comments on commit 69cbd14

Please sign in to comment.