Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

[ARMT] fixed result code when a message is not sent

  • Loading branch information...
commit eaafe64af8dc4272ca4fd405b566f123014a4dcb 1 parent 31c8748
@gnif authored
Showing with 6 additions and 0 deletions.
  1. +6 −0 common/CMessageBuilder.cc
View
6 common/CMessageBuilder.cc
@@ -204,6 +204,8 @@ bool CMessageBuilder::Send(int &result)
/* get the data */
std::stringstream ss;
+
+ /* skip segments with no data, unless the function is NULL */
if (segment->second && !segment->second(ss))
continue;
@@ -218,7 +220,11 @@ bool CMessageBuilder::Send(int &result)
/* if there is nothing to send, do not do anything */
if (!send)
+ {
+ /* forge a 202 response */
+ result = 202;
return true;
+ }
std::stringstream compressed;
CCompress::Deflate(total, compressed);
Please sign in to comment.
Something went wrong with that request. Please try again.