diff options
Diffstat (limited to 'ktalkd/ktalkd/machines/talkconn.cpp')
-rw-r--r-- | ktalkd/ktalkd/machines/talkconn.cpp | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/ktalkd/ktalkd/machines/talkconn.cpp b/ktalkd/ktalkd/machines/talkconn.cpp index c7b8e738..b2e5710a 100644 --- a/ktalkd/ktalkd/machines/talkconn.cpp +++ b/ktalkd/ktalkd/machines/talkconn.cpp @@ -247,13 +247,13 @@ void TalkConnection::findProtocol() { daemon.sin_addr = his_machine_addr; /* Prepare the variables used for reading on sockets */ - fd_set read_tqmask, ctl_tqmask; + fd_set read_mask, ctl_mask; int nready=0, cc; struct timeval wait; - FD_ZERO(&ctl_tqmask); - FD_SET(new_socket, &ctl_tqmask); - FD_SET(old_socket, &ctl_tqmask); + FD_ZERO(&ctl_mask); + FD_SET(new_socket, &ctl_mask); + FD_SET(old_socket, &ctl_mask); int max_socket = (new_socket > old_socket) ? new_socket : old_socket; /* Method : we send the two packets to the two remote daemons. @@ -279,10 +279,10 @@ void TalkConnection::findProtocol() { do { /* Wait for response */ - read_tqmask = ctl_tqmask; + read_mask = ctl_mask; wait.tv_sec = CTL_WAIT; wait.tv_usec = 0; - nready = ::select(max_socket+1, &read_tqmask, 0, 0, &wait); + nready = ::select(max_socket+1, &read_mask, 0, 0, &wait); if (nready < 0) { if (errno == EINTR) continue; @@ -292,7 +292,7 @@ void TalkConnection::findProtocol() { if (nready == 0) ktalk_debug("select returned 0 ! "); /* Analyze response */ - if (FD_ISSET(old_socket, &read_tqmask)) { + if (FD_ISSET(old_socket, &read_mask)) { ktalk_debug("Reading on old_socket"); cc = ::recv(old_socket, (char *)&old_resp, sizeof (old_resp), 0); if (cc < 0) { @@ -302,7 +302,7 @@ void TalkConnection::findProtocol() { } else if (old_resp.type == LOOK_UP) protocol=talkProtocol; // FOUND } - if (FD_ISSET(new_socket, &read_tqmask)) { + if (FD_ISSET(new_socket, &read_mask)) { ktalk_debug("Reading on new_socket"); cc = ::recv(new_socket, (char *)&new_resp, sizeof (new_resp), 0); if (cc < 0) { @@ -364,7 +364,7 @@ void TalkConnection::ctl_transact(int type, int id_num) * Let's check it, the way ktalk does. */ findProtocol(); - fd_set read_tqmask, ctl_tqmask; + fd_set read_mask, ctl_mask; int nready=0, cc, size, ok=0; struct timeval wait; struct sockaddr_in daemon_addr; @@ -386,8 +386,8 @@ void TalkConnection::ctl_transact(int type, int id_num) daemon_addr.sin_family = AF_INET; daemon_addr.sin_addr = his_machine_addr; daemon_addr.sin_port = (protocol == talkProtocol) ? talkDaemonPort : ntalkDaemonPort; - FD_ZERO(&ctl_tqmask); - FD_SET(ctl_sockt, &ctl_tqmask); + FD_ZERO(&ctl_mask); + FD_SET(ctl_sockt, &ctl_mask); /* Keep sending the message until a response of * the proper type is obtained. @@ -403,10 +403,10 @@ void TalkConnection::ctl_transact(int type, int id_num) continue; p_error("Error on write to talk daemon"); } - read_tqmask = ctl_tqmask; + read_mask = ctl_mask; wait.tv_sec = CTL_WAIT; wait.tv_usec = 0; - nready = ::select(ctl_sockt+1, &read_tqmask, 0, 0, &wait); + nready = ::select(ctl_sockt+1, &read_mask, 0, 0, &wait); if (nready < 0) { if (errno == EINTR) continue; @@ -429,10 +429,10 @@ void TalkConnection::ctl_transact(int type, int id_num) continue; p_error("Error on read from talk daemon"); } - read_tqmask = ctl_tqmask; + read_mask = ctl_mask; /* an immediate poll */ timerclear(&wait); - nready = ::select(ctl_sockt+1, &read_tqmask, 0, 0, &wait); + nready = ::select(ctl_sockt+1, &read_mask, 0, 0, &wait); if (protocol == talkProtocol) ok = (old_resp.type == type); else ok = ((new_resp.type == type) && (new_resp.vers == TALK_VERSION)); } while (nready > 0 && (!ok)); |