From 89eb3d63b790af04108f5d2eb293e1c189fe073f Mon Sep 17 00:00:00 2001 From: Adnan Ademovic Date: Sat, 13 May 2017 23:14:00 +0200 Subject: [PATCH] Don't check message definition matching --- src/tcpros/publisher.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/tcpros/publisher.rs b/src/tcpros/publisher.rs index 8ef5038..c154381 100644 --- a/src/tcpros/publisher.rs +++ b/src/tcpros/publisher.rs @@ -21,8 +21,10 @@ fn read_request(mut stream: &mut U, topic: &str) - let fields = header::decode(&mut stream)?; header::match_field(&fields, "md5sum", &T::md5sum())?; header::match_field(&fields, "type", &T::msg_type())?; - header::match_field(&fields, "message_definition", &T::msg_definition())?; header::match_field(&fields, "topic", topic)?; + if fields.get("message_definition").is_none() { + bail!(ErrorKind::HeaderMissingField("message_definition".into())); + } if fields.get("callerid").is_none() { bail!(ErrorKind::HeaderMissingField("callerid".into())); }