Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 17 additions & 1 deletion up-streamer/src/ustreamer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ use std::str;
use std::thread;
use subscription_cache::SubscriptionCache;
use up_rust::core::usubscription::{FetchSubscriptionsRequest, SubscriberInfo, USubscription};
use up_rust::{UCode, UListener, UMessage, UStatus, UTransport, UUIDBuilder, UUri};
use up_rust::{UCode, UListener, UMessage, UPayloadFormat, UStatus, UTransport, UUIDBuilder, UUri};

const USTREAMER_TAG: &str = "UStreamer:";
const USTREAMER_FN_NEW_TAG: &str = "new():";
Expand Down Expand Up @@ -916,6 +916,22 @@ impl UListener for ForwardingListener {
FORWARDING_LISTENER_FN_ON_RECEIVE_TAG,
&msg
);

if msg.attributes.payload_format.enum_value_or_default()
== UPayloadFormat::UPAYLOAD_FORMAT_SHM
{
debug!(
"{}:{}:{} Received message with type UPAYLOAD_FORMAT_SHM, \
which is not supported. A pointer to shared memory will not \
be usable on another device. UAttributes: {:#?}",
self.forwarding_id,
FORWARDING_LISTENER_TAG,
FORWARDING_LISTENER_FN_ON_RECEIVE_TAG,
&msg.attributes
);
return;
}

if let Err(e) = self.sender.send(Arc::new(msg)).await {
error!(
"{}:{}:{} Unable to send message to worker pool: {e:?}",
Expand Down