use MessageBuilder::toBytes (#2167)
parent
74801bd216
commit
272f60221c
|
@ -312,8 +312,7 @@ void encoder_thread(bool is_streaming, bool raw_clips, int cam_idx) {
|
||||||
eidx.setSegmentNum(out_segment);
|
eidx.setSegmentNum(out_segment);
|
||||||
eidx.setSegmentId(out_id);
|
eidx.setSegmentId(out_id);
|
||||||
|
|
||||||
auto words = capnp::messageToFlatArray(msg);
|
auto bytes = msg.toBytes();
|
||||||
auto bytes = words.asBytes();
|
|
||||||
|
|
||||||
if (idx_sock->send((char*)bytes.begin(), bytes.size()) < 0) {
|
if (idx_sock->send((char*)bytes.begin(), bytes.size()) < 0) {
|
||||||
printf("err sending encodeIdx pkt: %s\n", strerror(errno));
|
printf("err sending encodeIdx pkt: %s\n", strerror(errno));
|
||||||
|
@ -343,8 +342,7 @@ void encoder_thread(bool is_streaming, bool raw_clips, int cam_idx) {
|
||||||
eidx.setSegmentNum(out_segment);
|
eidx.setSegmentNum(out_segment);
|
||||||
eidx.setSegmentId(out_id);
|
eidx.setSegmentId(out_id);
|
||||||
|
|
||||||
auto words = capnp::messageToFlatArray(msg);
|
auto bytes = msg.toBytes();
|
||||||
auto bytes = words.asBytes();
|
|
||||||
if (lh) {
|
if (lh) {
|
||||||
lh_log(lh, bytes.begin(), bytes.size(), false);
|
lh_log(lh, bytes.begin(), bytes.size(), false);
|
||||||
}
|
}
|
||||||
|
@ -518,8 +516,7 @@ static void bootlog() {
|
||||||
std::string lastPmsg = util::read_file("/sys/fs/pstore/pmsg-ramoops-0");
|
std::string lastPmsg = util::read_file("/sys/fs/pstore/pmsg-ramoops-0");
|
||||||
boot.setLastPmsg(capnp::Data::Reader((const kj::byte*)lastPmsg.data(), lastPmsg.size()));
|
boot.setLastPmsg(capnp::Data::Reader((const kj::byte*)lastPmsg.data(), lastPmsg.size()));
|
||||||
|
|
||||||
auto words = capnp::messageToFlatArray(msg);
|
auto bytes = msg.toBytes();
|
||||||
auto bytes = words.asBytes();
|
|
||||||
logger_log(&s.logger, bytes.begin(), bytes.size(), false);
|
logger_log(&s.logger, bytes.begin(), bytes.size(), false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue