Changeset View
Changeset View
Standalone View
Standalone View
head/usr.bin/talk/invite.c
Show First 20 Lines • Show All 71 Lines • ▼ Show 20 Lines | invite_remote(void) | ||||
struct itimerval itimer; | struct itimerval itimer; | ||||
CTL_RESPONSE response; | CTL_RESPONSE response; | ||||
itimer.it_value.tv_sec = RING_WAIT; | itimer.it_value.tv_sec = RING_WAIT; | ||||
itimer.it_value.tv_usec = 0; | itimer.it_value.tv_usec = 0; | ||||
itimer.it_interval = itimer.it_value; | itimer.it_interval = itimer.it_value; | ||||
if (listen(sockt, 5) != 0) | if (listen(sockt, 5) != 0) | ||||
p_error("Error on attempt to listen for caller"); | p_error("Error on attempt to listen for caller"); | ||||
#ifdef MSG_EOR | |||||
/* copy new style sockaddr to old, swap family (short in old) */ | /* copy new style sockaddr to old, swap family (short in old) */ | ||||
msg.addr = *(struct osockaddr *)&my_addr; /* XXX new to old style*/ | msg.addr = *(struct tsockaddr *)&my_addr; | ||||
msg.addr.sa_family = htons(my_addr.sin_family); | msg.addr.sa_family = htons(my_addr.sin_family); | ||||
#else | |||||
msg.addr = *(struct sockaddr *)&my_addr; | |||||
#endif | |||||
msg.id_num = htonl(-1); /* an impossible id_num */ | msg.id_num = htonl(-1); /* an impossible id_num */ | ||||
invitation_waiting = 1; | invitation_waiting = 1; | ||||
announce_invite(); | announce_invite(); | ||||
/* | /* | ||||
* Shut off the automatic messages for a while, | * Shut off the automatic messages for a while, | ||||
* so we can use the interrupt timer to resend the invitation | * so we can use the interrupt timer to resend the invitation | ||||
*/ | */ | ||||
end_msgs(); | end_msgs(); | ||||
▲ Show 20 Lines • Show All 104 Lines • Show Last 20 Lines |