Support CoreMgmt over DRTIO on Zynq Devices #323
|
@ -234,6 +234,8 @@ mod remote_coremgmt {
|
||||||
*guard += 1;
|
*guard += 1;
|
||||||
*guard
|
*guard
|
||||||
};
|
};
|
||||||
|
let mut buffer = Vec::new();
|
||||||
|
|
||||||
loop {
|
loop {
|
||||||
if id != *pull_id.borrow() {
|
if id != *pull_id.borrow() {
|
||||||
// another connection attempts to pull the log...
|
// another connection attempts to pull the log...
|
||||||
|
@ -254,8 +256,12 @@ mod remote_coremgmt {
|
||||||
.await;
|
.await;
|
||||||
|
|
||||||
match reply {
|
match reply {
|
||||||
Ok(Packet::CoreMgmtGetLogReply { last: _, length, data }) => {
|
Ok(Packet::CoreMgmtGetLogReply { last, length, data }) => {
|
||||||
write_chunk(stream, &data[..length as usize]).await?;
|
buffer.extend(&data[..length as usize]);
|
||||||
|
if last {
|
||||||
|
write_chunk(stream, &buffer).await?;
|
||||||
|
buffer.clear();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
Ok(packet) => {
|
Ok(packet) => {
|
||||||
error!("received unexpected aux packet: {:?}", packet);
|
error!("received unexpected aux packet: {:?}", packet);
|
||||||
|
|
Loading…
Reference in New Issue