Commit 7048f3f8 authored by Steven Murray's avatar Steven Murray
Browse files

Renamed mediachanger::Header to avoid protobuf runtime CHECK error

parent ba9202b4
......@@ -23,7 +23,7 @@
#pragma once
#include "mediachanger/Header.pb.h"
#include "mediachanger/MediaChangerHeader.pb.h"
#include "mediachanger/ZmqMsg.hpp"
#include <cxxabi.h>
......@@ -39,7 +39,7 @@ struct Frame {
/**
* The header of the frame.
*/
Header header;
MediaChangerHeader header;
/**
* The body of the frame.
......
......@@ -18,7 +18,7 @@
package cta.mediachanger;
message Header {
message MediaChangerHeader {
required uint32 magic = 1;
//see castor::messages::protocolType's anonymous enum for values
......
......@@ -118,7 +118,7 @@ void connectZmqSocketToLocalhost(ZmqSocket &socket,
//------------------------------------------------------------------------------
// preFillHeader
//------------------------------------------------------------------------------
Header protoTapePreFillHeader() {
MediaChangerHeader protoTapePreFillHeader() {
return genericPreFillHeader<TPMAGIC, PROTOCOL_TYPE_TAPE,
PROTOCOL_VERSION_1>();
}
......
......@@ -26,7 +26,7 @@
#include "common/exception/Exception.hpp"
#include "mediachanger/Constants.hpp"
#include "mediachanger/Frame.hpp"
#include "mediachanger/Header.pb.h"
#include "mediachanger/MediaChangerHeader.pb.h"
#include "mediachanger/ZmqMsg.hpp"
#include "mediachanger/ZmqSocket.hpp"
......@@ -96,8 +96,8 @@ void connectZmqSocketToLocalhost(ZmqSocket &socket, const int port);
* After, the only fields left are reqtype, bodyhashvalue and bodyhashsignature
* @return The header
*/
template <int magic, int protocolType, int protocolVersion> Header genericPreFillHeader() {
Header header;
template <int magic, int protocolType, int protocolVersion> MediaChangerHeader genericPreFillHeader() {
MediaChangerHeader header;
header.set_magic(magic);
header.set_protocoltype(protocolType);
header.set_protocolversion(protocolVersion);
......@@ -112,7 +112,7 @@ template <int magic, int protocolType, int protocolVersion> Header genericPreFil
* protocolVersion = protocolVersion::prototype
* @return
*/
Header protoTapePreFillHeader();
MediaChangerHeader protoTapePreFillHeader();
/**
* Receives either a good-day reply-message or an exception message from the
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment