int send_metadata(uint32_t type, uint32_t code, char *data, uint32_t length, rtsp_message *carrier,
int block) {
int rc;
- rc = send_metadata_to_queue(&metadata_queue, type, code, data, length, carrier, block);
+ if (config.metadata_enabled)
+ rc = send_metadata_to_queue(&metadata_queue, type, code, data, length, carrier, block);
#ifdef CONFIG_METADATA_HUB
rc = send_metadata_to_queue(&metadata_hub_queue, type, code, data, length, carrier, block);
#endif
#ifdef CONFIG_METADATA
- metadata_stop(); // close down the metadata pipe
+ if (config.metadata_enabled)
+ metadata_stop(); // close down the metadata pipe
#endif
activity_monitor_stop(0);
#endif
memcpy(config.hw_addr, ap_md5, sizeof(config.hw_addr));
#ifdef CONFIG_METADATA
- metadata_init(); // create the metadata pipe if necessary
+ if (config.metadata_enabled)
+ metadata_init(); // create the metadata pipe if necessary
#endif
#ifdef CONFIG_METADATA_HUB