check_local()
{
CTL_RESPONSE response;
- register CTL_RESPONSE *rp = &response;
/* the rest of msg was set up in get_names */
#ifdef MSG_EOR
msg.ctl_addr = *(struct sockaddr *)&ctl_addr;
#endif
/* must be initiating a talk */
- if (!look_for_invite(rp))
+ if (!look_for_invite(&response))
return (0);
/*
* There was an invitation waiting for us,
*/
current_state = "Waiting to connect with caller";
do {
- if (rp->addr.sa_family != AF_INET)
+ if (ntohs(response.addr.sa_family) != AF_INET)
p_error("Response uses invalid network address");
errno = 0;
- if (connect(sockt,
- (struct sockaddr *)&rp->addr, sizeof (rp->addr)) != -1)
+ if (connect(sockt, (struct sockaddr *)&response.addr,
+ sizeof (response.addr)) != -1)
return (1);
} while (errno == EINTR);
if (errno == ECONNREFUSED) {
* invitation. (We know there are no newer invitations,
* the talkd works LIFO.)
*/
- ctl_transact(his_machine_addr, msg, DELETE, rp);
+ ctl_transact(his_machine_addr, msg, DELETE, &response);
close(sockt);
open_sockt();
return (0);