]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
[MINOR] http: remove the last call to stream_int_return
authorWilly Tarreau <w@1wt.eu>
Sun, 18 Oct 2009 21:56:35 +0000 (23:56 +0200)
committerWilly Tarreau <w@1wt.eu>
Sun, 18 Oct 2009 21:56:35 +0000 (23:56 +0200)
And remove the now unused function itself too.

include/proto/stream_interface.h
src/proto_http.c
src/stream_interface.c

index 6ee6ebfc61fbad24c5ab140d944e1fff733f3f67..4e7f7341959e1e20c6f0df9124fc546cb4b8fef7 100644 (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 */
index f98ff5ad2804a8b37a08b3ecc8c73892d59e1972..b83beb9e1ebeeb415815c7cce163f37b25c0af8c 100644 (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))
index f4b723b6df7b9afb47660e20e6572bcc1d8715c5..fcfa117b8ba859c3d42e179feaa8751c6e7b36c7 100644 (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.