diff options
Diffstat (limited to 'src/dabOutput')
-rw-r--r-- | src/dabOutput/dabOutput.h | 23 | ||||
-rw-r--r-- | src/dabOutput/dabOutputUdp.cpp | 3 |
2 files changed, 12 insertions, 14 deletions
diff --git a/src/dabOutput/dabOutput.h b/src/dabOutput/dabOutput.h index 5cb619f..bbf27e3 100644 --- a/src/dabOutput/dabOutput.h +++ b/src/dabOutput/dabOutput.h @@ -134,13 +134,16 @@ class DabOutputRaw : public DabOutput #ifndef _WIN32 isCyclades_ = other.isCyclades_; #endif - buffer_ = other.buffer_; + buffer_ = new unsigned char[6144]; + memcpy(buffer_, other.buffer_, 6144); } ~DabOutputRaw() { delete[] buffer_; } + const DabOutputRaw operator=(const DabOutputRaw& other); + int Open(const char* name); int Write(void* buffer, int size); int Close(); @@ -164,11 +167,11 @@ class DabOutputUdp : public DabOutput socket_ = new UdpSocket(); } - DabOutputUdp(const DabOutputUdp& other) - { - packet_ = other.packet_; - socket_ = other.socket_; - } + // make sure we don't copy this output around + // the UdpPacket and UdpSocket do not support + // copying either + DabOutputUdp(const DabOutputUdp& other); + DabOutputUdp operator=(const DabOutputUdp& other); ~DabOutputUdp() { delete socket_; @@ -195,12 +198,8 @@ class DabOutputTcp : public DabOutput client = NULL; } - DabOutputTcp(const DabOutputTcp& other) - { - server = other.server; - client = other.client; - thread_ = other.thread_; - } + DabOutputTcp(const DabOutputTcp& other); + DabOutputTcp operator=(const DabOutputTcp& other); ~DabOutputTcp() { diff --git a/src/dabOutput/dabOutputUdp.cpp b/src/dabOutput/dabOutputUdp.cpp index 459120f..607fe71 100644 --- a/src/dabOutput/dabOutputUdp.cpp +++ b/src/dabOutput/dabOutputUdp.cpp @@ -38,8 +38,7 @@ # include <sys/types.h> # include <sys/socket.h> # include <sys/ioctl.h> -# include <linux/if_packet.h> -# include <linux/netdevice.h> +# include <net/if_packet.h> # include <net/if_arp.h> #endif |