src/session.c
void default_srv_error(struct session *s, struct stream_interface *si)
{
	int err_type = si->err_type;
	int err = 0, fin = 0;

	if (err_type & SI_ET_QUEUE_ABRT) {
		err = SN_ERR_CLICL;
		fin = SN_FINST_Q;
	}
	else if (err_type & SI_ET_CONN_ABRT) {
		err = SN_ERR_CLICL;
		fin = SN_FINST_C;
	}
	else if (err_type & SI_ET_QUEUE_TO) {
		err = SN_ERR_SRVTO;
		fin = SN_FINST_Q;
	}
	else if (err_type & SI_ET_QUEUE_ERR) {
		err = SN_ERR_SRVCL;
		fin = SN_FINST_Q;
	}
	else if (err_type & SI_ET_CONN_TO) {
		err = SN_ERR_SRVTO;
		fin = SN_FINST_C;
	}
	else if (err_type & SI_ET_CONN_ERR) {
		err = SN_ERR_SRVCL;
		fin = SN_FINST_C;
	}
	else /* SI_ET_CONN_OTHER and others */ {
		err = SN_ERR_INTERNAL;
		fin = SN_FINST_C;
	}

	if (!(s->flags & SN_ERR_MASK))
		s->flags |= err;
	if (!(s->flags & SN_FINST_MASK))
		s->flags |= fin;
}
/* Handle server-side errors for default protocols. It is called whenever a a
 * connection setup is aborted or a request is aborted in queue. It sets the
 * session termination flags so that the caller does not have to worry about
 * them. It's installed as ->srv_error for the server-side stream_interface.
 */
Handle server-side errors for default protocols. It is called whenever a a
connection setup is aborted or a request is aborted in queue. It sets the
session termination flags so that the caller does not have to worry about
them. It's installed as ->srv_error for the server-side stream_interface.
Handle server - side errors for default protocols . It is called whenever a a connection setup is aborted or a request is aborted in queue . It sets the session termination flags so that the caller does not have to worry about them . It ' s installed as - > srv_error for the server - side stream_interface .
void default_srv_error(struct session *s, struct stream_interface *si)
{
	int err_type = si->err_type;
	int err = 0, fin = 0;
	if (err_type & SI_ET_QUEUE_ABRT) {
		err = SN_ERR_CLICL;
		fin = SN_FINST_Q;
	}
	else if (err_type & SI_ET_CONN_ABRT) {
		err = SN_ERR_CLICL;
		fin = SN_FINST_C;
	}
	else if (err_type & SI_ET_QUEUE_TO) {
		err = SN_ERR_SRVTO;
		fin = SN_FINST_Q;
	}
	else if (err_type & SI_ET_QUEUE_ERR) {
		err = SN_ERR_SRVCL;
		fin = SN_FINST_Q;
	}
	else if (err_type & SI_ET_CONN_TO) {
		err = SN_ERR_SRVTO;
		fin = SN_FINST_C;
	}
	else if (err_type & SI_ET_CONN_ERR) {
		err = SN_ERR_SRVCL;
		fin = SN_FINST_C;
	}
	else  {
		err = SN_ERR_INTERNAL;
		fin = SN_FINST_C;
	}
	if (!(s->flags & SN_ERR_MASK))
		s->flags |= err;
	if (!(s->flags & SN_FINST_MASK))
		s->flags |= fin;
}
void default_srv_error ( struct session * s , struct stream_interface * si ) { int err_type = si -> err_type ; int err = 0 , fin = 0 ; if ( err_type & SI_ET_QUEUE_ABRT ) { err = SN_ERR_CLICL ; fin = SN_FINST_Q ; } else if ( err_type & SI_ET_CONN_ABRT ) { err = SN_ERR_CLICL ; fin = SN_FINST_C ; } else if ( err_type & SI_ET_QUEUE_TO ) { err = SN_ERR_SRVTO ; fin = SN_FINST_Q ; } else if ( err_type & SI_ET_QUEUE_ERR ) { err = SN_ERR_SRVCL ; fin = SN_FINST_Q ; } else if ( err_type & SI_ET_CONN_TO ) { err = SN_ERR_SRVTO ; fin = SN_FINST_C ; } else if ( err_type & SI_ET_CONN_ERR ) { err = SN_ERR_SRVCL ; fin = SN_FINST_C ; } else { err = SN_ERR_INTERNAL ; fin = SN_FINST_C ; } if ( ! ( s -> flags & SN_ERR_MASK ) ) s -> flags |= err ; if ( ! ( s -> flags & SN_FINST_MASK ) ) s -> flags |= fin ; }
Handle server-side errors for default protocols.
Handle server - side errors for default protocols .
/* SI_ET_CONN_OTHER and others */