summaryrefslogtreecommitdiff
path: root/server/multicast.cc
diff options
context:
space:
mode:
Diffstat (limited to 'server/multicast.cc')
-rw-r--r--server/multicast.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/server/multicast.cc b/server/multicast.cc
index d78f68b..0b1cd31 100644
--- a/server/multicast.cc
+++ b/server/multicast.cc
@@ -38,6 +38,8 @@
#include <arpa/inet.h>
#include <sys/types.h>
+#include <string.h>
+
// For IP_MTU
//#include <linux/in.h>
//#ifndef IP_MTU
@@ -107,7 +109,8 @@ int Multicast::Write(void* buf, int size)
if(left == 0) {
// MIaV::info->info("Sending full packet");
- write(sock, udp_buffer, udp_buffer_size);
+ if(write(sock, udp_buffer, udp_buffer_size) != udp_buffer_size)
+ MIaV::info->error("Could not write all buffer to socket.");
left = udp_buffer_size;
udp_buffer_pointer = udp_buffer;
}