Skip to content
This repository has been archived by the owner on Jun 10, 2022. It is now read-only.

Commit

Permalink
fixed rollback message empty bug
Browse files Browse the repository at this point in the history
  • Loading branch information
nmred committed May 10, 2017
1 parent dd159f2 commit c498b78
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 9 deletions.
4 changes: 2 additions & 2 deletions rpm/aidp.spec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Summary: Weibo adinf kafka consumer using lua script
Name: aidp
Version:0.1.1
Version:0.1.2
Release:el6.5
Group:Development/Tools
License:BSD
Expand All @@ -14,7 +14,7 @@ Prefix:/usr/local/adinf/aidp
Requires:sudo
%define debug_packages %{nil}
%define debug_package %{nil}
%define _topdir /usr/home/zhongxiu/rpmbuild
%define _topdir /home/vagrant/rpmbuild
%description
-------------------------------------
- Everything in order to facilitate -
Expand Down
4 changes: 2 additions & 2 deletions rpm/build_rpm
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ CUR_PWD=`pwd`
PATH_DEV_SWAN=/usr/local/adinf/aidp

# build rpm 包的目录
BUILD_ROOT="/usr/home/zhongxiu/rpmbuild"
BUILD_ROOT="/home/vagrant/rpmbuild"
SWANSOFT_NAME="aidp"
SWANSOFT_VERSION="0.1.1"
SWANSOFT_VERSION="0.1.2"
BUILD_TMP=/tmp
BUILD_BALL=$BUILD_TMP/$SWANSOFT_NAME-$SWANSOFT_VERSION

Expand Down
5 changes: 3 additions & 2 deletions src/App/Message.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ void Message::initLua() {
GetMessageFn getMessageFn = std::bind(&app::Message::getMessage, this);
clazz.addMethod("get", getMessageFn);

typedef std::function<void (std::list<std::string>)> RollBackMessageFn;
typedef std::function<int (std::list<std::string>)> RollBackMessageFn;
RollBackMessageFn rollbackFn = std::bind(&app::Message::rollback, this, std::placeholders::_1);
clazz.addMethod("rollback", rollbackFn);

Expand All @@ -140,7 +140,8 @@ MessageToLua Message::getMessage() {
for (auto &t : messageLuaMessages) {
std::list<std::string> item;
std::string id = convertKey(t.second);
std::string message = t.second.message.retrieveAllAsString();
adbase::Buffer tmp = t.second.message;
std::string message = tmp.retrieveAllAsString();
item.push_back(id);
item.push_back(t.second.topicName);
item.push_back(message);
Expand Down
6 changes: 3 additions & 3 deletions src/Version.hpp
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
/// 该程序自动生成,禁止修改
#ifndef AIDP_VERSION_HPP_
#define AIDP_VERSION_HPP_
#define VERSION "0.1.1"
#define VERSION "0.1.2"
#define SOVERSION ""
#define GIT_DIRTY "0"
#define GIT_SHA1 "1aa5d7c5"
#define BUILD_ID "bpdev-1491978244"
#define GIT_SHA1 "dd159f26"
#define BUILD_ID "bpdev-1494320380"
#define BUILD_TYPE "Release"
#endif

0 comments on commit c498b78

Please sign in to comment.