old/talk/talk/invite.c
/*
 * Transmit the invitation and process the response
 */
Transmit the invitation and process the response
Transmit the invitation and process the response
void
announce_invite()
{
	CTL_RESPONSE response;
	current_state = "Trying to connect to your party's talk daemon";
	ctl_transact(his_machine_addr, msg, ANNOUNCE, &response);
	remote_id = response.id_num;
	if (response.answer != SUCCESS) {
		switch (response.answer) {
		case NOT_HERE :
			message("Your party is not logged on");
			break;
		case MACHINE_UNKNOWN :
			message("Target machine does not recognize us");
			break;
		case UNKNOWN_REQUEST :
			message("Target machine can not handle remote talk");
			break;
		case FAILED :
			message("Target machine is too confused to talk to us");
			break;
		case PERMISSION_DENIED :
			message("Your party is refusing messages");
			break;
		}
		quit();
	}
	ctl_transact(my_machine_addr, msg, LEAVE_INVITE, &response);
	local_id = response.id_num;
}
void announce_invite ( ) { CTL_RESPONSE response ; current_state = " " ; ctl_transact ( his_machine_addr , msg , ANNOUNCE , & response ) ; remote_id = response . id_num ; if ( response . answer != SUCCESS ) { switch ( response . answer ) { case NOT_HERE : message ( " " ) ; break ; case MACHINE_UNKNOWN : message ( " " ) ; break ; case UNKNOWN_REQUEST : message ( " " ) ; break ; case FAILED : message ( " " ) ; break ; case PERMISSION_DENIED : message ( " " ) ; break ; } quit ( ) ; } ctl_transact ( my_machine_addr , msg , LEAVE_INVITE , & response ) ; local_id = response . id_num ; }
Transmit the invitation and process the response
Transmit the invitation and process the response
/* leave the actual invitation on my talk daemon */