summaryrefslogtreecommitdiffstats
path: root/src/dabOutput
diff options
context:
space:
mode:
Diffstat (limited to 'src/dabOutput')
-rw-r--r--src/dabOutput/dabOutput.h6
-rw-r--r--src/dabOutput/dabOutputZMQ.cpp4
2 files changed, 7 insertions, 3 deletions
diff --git a/src/dabOutput/dabOutput.h b/src/dabOutput/dabOutput.h
index 58a2929..4142b25 100644
--- a/src/dabOutput/dabOutput.h
+++ b/src/dabOutput/dabOutput.h
@@ -305,11 +305,12 @@ struct zmq_dab_message_t
class DabOutputZMQ : public DabOutput
{
public:
- DabOutputZMQ(const std::string &zmq_proto) :
+ DabOutputZMQ(const std::string &zmq_proto, bool allow_metadata) :
endpoint_(""),
zmq_proto_(zmq_proto), zmq_context_(1),
zmq_pub_sock_(zmq_context_, ZMQ_PUB),
- zmq_message_ix(0)
+ zmq_message_ix(0),
+ m_allow_metadata(allow_metadata)
{ }
DabOutputZMQ(const DabOutputZMQ& other) = delete;
@@ -338,6 +339,7 @@ class DabOutputZMQ : public DabOutput
zmq_dab_message_t zmq_message;
int zmq_message_ix;
+ bool m_allow_metadata;
std::vector<std::shared_ptr<OutputMetadata> > meta_;
};
diff --git a/src/dabOutput/dabOutputZMQ.cpp b/src/dabOutput/dabOutputZMQ.cpp
index 582af80..f50b7c3 100644
--- a/src/dabOutput/dabOutputZMQ.cpp
+++ b/src/dabOutput/dabOutputZMQ.cpp
@@ -126,7 +126,9 @@ int DabOutputZMQ::Close()
void DabOutputZMQ::setMetadata(std::shared_ptr<OutputMetadata> &md)
{
- meta_.push_back(md);
+ if (m_allow_metadata) {
+ meta_.push_back(md);
+ }
}
#endif