Commit c43b233d authored by armin's avatar armin
Browse files

mend

parent 7ad9a5f9
...@@ -7,7 +7,7 @@ ADD . /pushGateway/RocketChatMobilePushGateway ...@@ -7,7 +7,7 @@ ADD . /pushGateway/RocketChatMobilePushGateway
RUN cd /pushGateway/RocketChatMobilePushGateway \ RUN cd /pushGateway/RocketChatMobilePushGateway \
&& cmake . \ && cmake . \
&& make \ && make -j$[$(nproc) + 1] \
&& rm CMake* -rf \ && rm CMake* -rf \
&& rm cmake* -rf && rm cmake* -rf
......
...@@ -56,7 +56,7 @@ void ApplePushHandler::onEOM() noexcept { ...@@ -56,7 +56,7 @@ void ApplePushHandler::onEOM() noexcept {
if(forwardModel.forwardMessage(std::move(mHeaders), body)){ if(forwardModel.forwardMessage(std::move(mHeaders), body)){
ResponseBuilder(downstream_).status(200, "OK").body("").sendWithEOM(); ResponseBuilder(downstream_).status(200, "OK").body("").sendWithEOM();
}else{ }else{
ResponseBuilder(downstream_).status(500, "FAILURE").body("failed to send push message").sendWithEOM(); ResponseBuilder(downstream_).status(500, "FAILURE").body("failed to send push message through forwardgateway").sendWithEOM();
} }
} }
else { else {
......
...@@ -54,7 +54,7 @@ void GooglePushHandler::onEOM() noexcept { ...@@ -54,7 +54,7 @@ void GooglePushHandler::onEOM() noexcept {
if(forwardModel.forwardMessage(std::move(mHeaders), body)){ if(forwardModel.forwardMessage(std::move(mHeaders), body)){
ResponseBuilder(downstream_).status(200, "OK").body("").sendWithEOM(); ResponseBuilder(downstream_).status(200, "OK").body("").sendWithEOM();
}else{ }else{
ResponseBuilder(downstream_).status(500, "FAILURE").body("failed to send push message").sendWithEOM(); ResponseBuilder(downstream_).status(500, "FAILURE").body("failed to send push message through forwardgateway").sendWithEOM();
} }
}else { }else {
ResponseBuilder(downstream_).status(500, "FAILURE").body("failed to send push message").sendWithEOM(); ResponseBuilder(downstream_).status(500, "FAILURE").body("failed to send push message").sendWithEOM();
......
...@@ -33,7 +33,6 @@ size_t ForwardGatewayModel::curlWriteCallback(void *buffer, size_t size, size_t ...@@ -33,7 +33,6 @@ size_t ForwardGatewayModel::curlWriteCallback(void *buffer, size_t size, size_t
if (buffer != nullptr) { if (buffer != nullptr) {
std::string bufferString(static_cast<char *>(buffer), nmemb); std::string bufferString(static_cast<char *>(buffer), nmemb);
LOG(ERROR)<<"forwardgateway error response: "<<bufferString; LOG(ERROR)<<"forwardgateway error response: "<<bufferString;
LOG(ERROR)<<"failed message: "<< reinterpret_cast<const char*>(this_ptr);
return 0; return 0;
} }
return 1; return 1;
...@@ -63,7 +62,6 @@ bool ForwardGatewayModel::forwardMessage(std::unique_ptr<HTTPMessage> pHeaders, ...@@ -63,7 +62,6 @@ bool ForwardGatewayModel::forwardMessage(std::unique_ptr<HTTPMessage> pHeaders,
curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, false); curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, false);
curl_easy_setopt(curl, CURLOPT_TCP_KEEPALIVE, true); curl_easy_setopt(curl, CURLOPT_TCP_KEEPALIVE, true);
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, curlWriteCallback); curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, curlWriteCallback);
curl_easy_setopt(curl, CURLOPT_WRITEDATA, pBody.c_str());
res = curl_easy_perform(curl); res = curl_easy_perform(curl);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment