From 7d39c063ea84b9b30dbe669ac4ae641a49506836 Mon Sep 17 00:00:00 2001 From: deva Date: Thu, 20 Jul 2006 17:53:17 +0000 Subject: Utilized the global info object. Utilized the global info object. Utilized the global info object. --- server/multicast.cc | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'server/multicast.cc') diff --git a/server/multicast.cc b/server/multicast.cc index dd12c27..2bb6df1 100644 --- a/server/multicast.cc +++ b/server/multicast.cc @@ -30,6 +30,7 @@ #include "multicast_configuration.h" #include "miav_config.h" +#include "info.h" #include #include @@ -46,16 +47,15 @@ #include -Multicast::Multicast(Info *i, mcastconf_t &mcclientconf) +Multicast::Multicast(mcastconf_t &mcclientconf) { - info = i; udp_buffer = NULL; multicast_audio = mcclientconf.with_audio; // Open connection socket if(!UDPOpen(mcclientconf.addr.c_str(), mcclientconf.port)) - info->error("Error creating socket %s:%d", + MIaV::info->error("Error creating socket %s:%d", mcclientconf.addr.c_str(), mcclientconf.port); @@ -69,10 +69,10 @@ Multicast::Multicast(Info *i, mcastconf_t &mcclientconf) if(udp_buffer_size < 1) udp_buffer_size = 1; udp_buffer = new char[udp_buffer_size]; udp_buffer_pointer = udp_buffer; - info->info("UDP packet buffer size %db", udp_buffer_size); + MIaV::info->info("UDP packet buffer size %db", udp_buffer_size); //} else { - // info->error("Error getting MTU size from socket: %s", strerror(errno)); + // MIaV::info->error("Error getting MTU size from socket: %s", strerror(errno)); // return; //} } @@ -86,7 +86,7 @@ int Multicast::Write(void* buf, int size) { if(!udp_buffer) return 0; // no buffer to write in... better break out! - // info->info("To send: %d", size); + // MIaV::info->info("To send: %d", size); char *p = (char*)buf; int left = udp_buffer_size - (udp_buffer_pointer - udp_buffer); @@ -102,10 +102,10 @@ int Multicast::Write(void* buf, int size) p+=to_copy; size-=to_copy; - // info->info("Copied %d - %d to go", to_copy, size); + // MIaV::info->info("Copied %d - %d to go", to_copy, size); if(left == 0) { - // info->info("Sending full packet"); + // MIaV::info->info("Sending full packet"); write(sock, udp_buffer, udp_buffer_size); left = udp_buffer_size; udp_buffer_pointer = udp_buffer; @@ -117,10 +117,10 @@ int Multicast::Write(void* buf, int size) bool Multicast::is_address_multicast(unsigned long address) { if((address & 255) >= 224 && (address & 255) <= 239) { - info->info("Address is multicast."); + MIaV::info->info("Address is multicast."); return true; } - info->info("Address is NOT multicast."); + MIaV::info->info("Address is NOT multicast."); return false; } -- cgit v1.2.3