summaryrefslogtreecommitdiff
path: root/apps/drwho/CM_Client.cpp
diff options
context:
space:
mode:
authorcoryan <coryan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2000-04-20 16:23:14 +0000
committercoryan <coryan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2000-04-20 16:23:14 +0000
commitcfc23b0542ac7e83a5709f0b3ef9dad56e0157fe (patch)
tree9e166379282c47d78e3822db842f7f0000250a3d /apps/drwho/CM_Client.cpp
parent39bde59f04993a1335d60f0cf31ef440d42c30e3 (diff)
downloadATCD-cfc23b0542ac7e83a5709f0b3ef9dad56e0157fe.tar.gz
ChangeLogTag:Thu Apr 20 09:20:28 2000 Carlos O'Ryan <coryan@uci.edu>
Diffstat (limited to 'apps/drwho/CM_Client.cpp')
-rw-r--r--apps/drwho/CM_Client.cpp19
1 files changed, 8 insertions, 11 deletions
diff --git a/apps/drwho/CM_Client.cpp b/apps/drwho/CM_Client.cpp
index 4c553b04dae..e223b404fbd 100644
--- a/apps/drwho/CM_Client.cpp
+++ b/apps/drwho/CM_Client.cpp
@@ -9,13 +9,11 @@
int
CM_Client::open (short port_number)
{
- int max_packet_size = UDP_PACKET_SIZE;
-
Comm_Manager::sokfd_ = ACE_OS::socket (PF_INET, SOCK_DGRAM, 0);
if (Comm_Manager::sokfd_ == ACE_INVALID_HANDLE)
return -1;
-
+
ACE_OS::memset ((char *) &this->sin_,
0,
sizeof this->sin_);
@@ -43,7 +41,7 @@ CM_Client::receive (int timeout)
if (ACE_OS::select (Comm_Manager::sokfd_ + 1,
&this->read_fd_,
0,
- 0,
+ 0,
this->top_) <= 0)
break;
else
@@ -80,9 +78,9 @@ CM_Client::receive (int timeout)
}
for (const char *host_name;
- Multicast_Manager::get_next_non_responding_host (host_name);
+ Multicast_Manager::get_next_non_responding_host (host_name);
)
- ACE_DEBUG ((LM_DEBUG,
+ ACE_DEBUG ((LM_DEBUG,
"%s did not respond\n",
host_name));
return 1;
@@ -92,10 +90,10 @@ int
CM_Client::send (void)
{
int packet_length = 0;
-
+
if (this->mux (this->send_packet_, packet_length) < 0)
return -1;
-
+
// Ship off the info to all the hosts.
while (Multicast_Manager::get_next_host_addr (this->sin_.sin_addr) != 0)
@@ -105,8 +103,8 @@ CM_Client::send (void)
hostent *np = ACE_OS::gethostbyaddr ((char *) &this->sin_.sin_addr,
sizeof this->sin_.sin_addr,
AF_INET);
-
- ACE_DEBUG ((LM_DEBUG,
+
+ ACE_DEBUG ((LM_DEBUG,
"sending to server host %s (%s)\n",
np->h_name,
inet_ntoa (this->sin_.sin_addr)));
@@ -136,4 +134,3 @@ CM_Client::~CM_Client (void)
ACE_OS::closesocket (Comm_Manager::sokfd_);
}
-