[MINOR] http: remove the last call to stream_int_return

And remove the now unused function itself too.
This commit is contained in:
Willy Tarreau 2009-10-18 23:56:35 +02:00
parent b50943e717
commit 8e89b84848
3 changed files with 20 additions and 36 deletions

View File

@ -1,23 +1,23 @@
/*
include/proto/stream_interface.h
This file contains stream_interface function prototypes
Copyright (C) 2000-2009 Willy Tarreau - w@1wt.eu
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation, version 2.1
exclusively.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
* include/proto/stream_interface.h
* This file contains stream_interface function prototypes
*
* Copyright (C) 2000-2009 Willy Tarreau - w@1wt.eu
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation, version 2.1
* exclusively.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef _PROTO_STREAM_INTERFACE_H
#define _PROTO_STREAM_INTERFACE_H
@ -31,7 +31,6 @@
/* main event functions used to move data between sockets and buffers */
int stream_int_check_timeouts(struct stream_interface *si);
void stream_int_report_error(struct stream_interface *si);
void stream_int_return(struct stream_interface *si, const struct chunk *msg);
void stream_int_retnclose(struct stream_interface *si, const struct chunk *msg);
/* functions used when running a stream interface as a task */

View File

@ -3247,11 +3247,9 @@ int http_process_res_common(struct session *t, struct buffer *rep, int an_bit, s
t->srv->counters.failed_resp++;
cur_proxy->counters.failed_resp++;
return_srv_prx_502:
buffer_shutr_now(rep);
buffer_shutw_now(req);
rep->analysers = 0;
txn->status = 502;
stream_int_return(rep->cons, error_message(t, HTTP_ERR_502));
stream_int_retnclose(rep->cons, error_message(t, HTTP_ERR_502));
if (!(t->flags & SN_ERR_MASK))
t->flags |= SN_ERR_PRXCOND;
if (!(t->flags & SN_FINST_MASK))

View File

@ -59,19 +59,6 @@ void stream_int_report_error(struct stream_interface *si)
si->ib->flags |= BF_READ_ERROR;
}
/*
* Erase any content from input and output buffers, and return a message into
* the output buffer. The message is provided as a "chunk". If it is null,
* then an empty message is used.
*/
void stream_int_return(struct stream_interface *si, const struct chunk *msg)
{
buffer_erase(si->ib);
buffer_cut_tail(si->ob);
if (msg && msg->len)
buffer_write(si->ob, msg->str, msg->len);
}
/*
* Returns a message to the client ; the connection is shut down for read,
* and the request is cleared so that no server connection can be initiated.