examples: fix manual protobuf encoding
Commit ("examples: get C++ hello_world module working")
updated the manual encoding of a GrpcResponse protobuf to allow for
the removal of the Any type, but forgot to update the enclosing length.
This means that the last=true flag was not being picked up.
@@ -27,13 +27,13 @@ extern "C" void process_invocation(const uint8_t* _req_buf, uint32_t _req_size,
// Ignore the contents of the incoming request.
// Manually create an encapsulated GrpcResponse protobuf and send it back.
// 0a b00001.010 = tag 1 (GrpcResponse.rsp_msg), length-delimited field
- // 0b length=11
+ // 09 length=9
// 0a b00001.010 = tag 1 (HelloResponse.reply), length-delimited field
// 07 length=7
// 74657374696e67 "testing"
// 18 b00011.000 = tag 3 (GrpcResponse.last), varint
// 01 true
- uint8_t rsp_buf[] = "\x0a\x0b\x0a\x07\x74\x65\x73\x74\x69\x6e\x67\x18\x01";
+ uint8_t rsp_buf[] = "\x0a\x09\x0a\x07\x74\x65\x73\x74\x69\x6e\x67\x18\x01";
// TODO(#422): replace with use of message type and serialization.
channel_write(rsp_handle, rsp_buf, sizeof(rsp_buf) - 1, nullptr, 0);
}
