=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/talk/look_up.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- src/usr.bin/talk/look_up.c 1995/10/18 08:46:12 1.1 +++ src/usr.bin/talk/look_up.c 1996/04/28 23:58:05 1.2 @@ -54,7 +54,6 @@ check_local() { CTL_RESPONSE response; - register CTL_RESPONSE *rp = &response; /* the rest of msg was set up in get_names */ #ifdef MSG_EOR @@ -65,7 +64,7 @@ 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, @@ -73,11 +72,11 @@ */ 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) { @@ -87,7 +86,7 @@ * 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);