mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-08-06 15:17:01 +02:00
CLEANUP: stream_interface: stop exporting socket layer functions
Similarly to the previous patch, we don't need the socket-layer functions outside of stream_interface. They could even move to a file dedicated to applets, though that does not seem particularly useful at the moment.
This commit is contained in:
parent
b277d6e568
commit
f873d754f8
@ -2,7 +2,7 @@
|
||||
* include/proto/stream_interface.h
|
||||
* This file contains stream_interface function prototypes
|
||||
*
|
||||
* Copyright (C) 2000-2011 Willy Tarreau - w@1wt.eu
|
||||
* Copyright (C) 2000-2012 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
|
||||
@ -33,14 +33,6 @@ int stream_int_check_timeouts(struct stream_interface *si);
|
||||
void stream_int_report_error(struct stream_interface *si);
|
||||
void stream_int_retnclose(struct stream_interface *si, const struct chunk *msg);
|
||||
|
||||
/* functions used when running a stream interface as a task */
|
||||
void stream_int_update(struct stream_interface *si);
|
||||
void stream_int_update_embedded(struct stream_interface *si);
|
||||
void stream_int_shutr(struct stream_interface *si);
|
||||
void stream_int_shutw(struct stream_interface *si);
|
||||
void stream_int_chk_rcv(struct stream_interface *si);
|
||||
void stream_int_chk_snd(struct stream_interface *si);
|
||||
|
||||
extern struct sock_ops stream_int_embedded;
|
||||
extern struct sock_ops stream_int_task;
|
||||
|
||||
|
@ -1177,13 +1177,12 @@ static struct session *peer_session_create(struct peer *peer, struct peer_sessio
|
||||
s->si[1].release = NULL;
|
||||
s->si[1].send_proxy_ofs = 0;
|
||||
set_target_proxy(&s->si[1].target, s->be);
|
||||
stream_interface_prepare(&s->si[1], &sock_raw);
|
||||
s->si[1].exp = TICK_ETERNITY;
|
||||
s->si[1].flags = SI_FL_NONE;
|
||||
if (s->be->options2 & PR_O2_INDEPSTR)
|
||||
s->si[1].flags |= SI_FL_INDEP_STR;
|
||||
|
||||
stream_interface_prepare(&s->si[1], &sock_raw);
|
||||
|
||||
session_init_srv_conn(s);
|
||||
set_target_proxy(&s->target, s->be);
|
||||
s->pend_pos = NULL;
|
||||
|
@ -199,8 +199,7 @@ int session_accept(struct listener *l, int cfd, struct sockaddr_storage *addr)
|
||||
s->si[1].release = NULL;
|
||||
s->si[1].send_proxy_ofs = 0;
|
||||
clear_target(&s->si[1].target);
|
||||
s->si[1].sock.shutr= stream_int_shutr;
|
||||
s->si[1].sock.shutw= stream_int_shutw;
|
||||
stream_interface_prepare(&s->si[1], &stream_int_embedded);
|
||||
s->si[1].exp = TICK_ETERNITY;
|
||||
s->si[1].flags = SI_FL_NONE;
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*
|
||||
* Functions managing stream_interface structures
|
||||
*
|
||||
* Copyright 2000-2011 Willy Tarreau <w@1wt.eu>
|
||||
* Copyright 2000-2012 Willy Tarreau <w@1wt.eu>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
@ -32,6 +32,14 @@
|
||||
#include <proto/stream_interface.h>
|
||||
#include <proto/task.h>
|
||||
|
||||
/* socket functions used when running a stream interface as a task */
|
||||
static void stream_int_update(struct stream_interface *si);
|
||||
static void stream_int_update_embedded(struct stream_interface *si);
|
||||
static void stream_int_shutr(struct stream_interface *si);
|
||||
static void stream_int_shutw(struct stream_interface *si);
|
||||
static void stream_int_chk_rcv(struct stream_interface *si);
|
||||
static void stream_int_chk_snd(struct stream_interface *si);
|
||||
|
||||
/* socket operations for embedded tasks */
|
||||
struct sock_ops stream_int_embedded = {
|
||||
.update = stream_int_update_embedded,
|
||||
@ -107,7 +115,7 @@ void stream_int_retnclose(struct stream_interface *si, const struct chunk *msg)
|
||||
}
|
||||
|
||||
/* default update function for scheduled tasks, not used for embedded tasks */
|
||||
void stream_int_update(struct stream_interface *si)
|
||||
static void stream_int_update(struct stream_interface *si)
|
||||
{
|
||||
DPRINTF(stderr, "%s: si=%p, si->state=%d ib->flags=%08x ob->flags=%08x\n",
|
||||
__FUNCTION__,
|
||||
@ -118,7 +126,7 @@ void stream_int_update(struct stream_interface *si)
|
||||
}
|
||||
|
||||
/* default update function for embedded tasks, to be used at the end of the i/o handler */
|
||||
void stream_int_update_embedded(struct stream_interface *si)
|
||||
static void stream_int_update_embedded(struct stream_interface *si)
|
||||
{
|
||||
int old_flags = si->flags;
|
||||
|
||||
@ -197,7 +205,7 @@ void stream_int_update_embedded(struct stream_interface *si)
|
||||
}
|
||||
|
||||
/* default shutr function for scheduled tasks */
|
||||
void stream_int_shutr(struct stream_interface *si)
|
||||
static void stream_int_shutr(struct stream_interface *si)
|
||||
{
|
||||
DPRINTF(stderr, "%s: si=%p, si->state=%d ib->flags=%08x ob->flags=%08x\n",
|
||||
__FUNCTION__,
|
||||
@ -227,7 +235,7 @@ void stream_int_shutr(struct stream_interface *si)
|
||||
}
|
||||
|
||||
/* default shutw function for scheduled tasks */
|
||||
void stream_int_shutw(struct stream_interface *si)
|
||||
static void stream_int_shutw(struct stream_interface *si)
|
||||
{
|
||||
DPRINTF(stderr, "%s: si=%p, si->state=%d ib->flags=%08x ob->flags=%08x\n",
|
||||
__FUNCTION__,
|
||||
@ -268,7 +276,7 @@ void stream_int_shutw(struct stream_interface *si)
|
||||
}
|
||||
|
||||
/* default chk_rcv function for scheduled tasks */
|
||||
void stream_int_chk_rcv(struct stream_interface *si)
|
||||
static void stream_int_chk_rcv(struct stream_interface *si)
|
||||
{
|
||||
struct buffer *ib = si->ib;
|
||||
|
||||
@ -293,7 +301,7 @@ void stream_int_chk_rcv(struct stream_interface *si)
|
||||
}
|
||||
|
||||
/* default chk_snd function for scheduled tasks */
|
||||
void stream_int_chk_snd(struct stream_interface *si)
|
||||
static void stream_int_chk_snd(struct stream_interface *si)
|
||||
{
|
||||
struct buffer *ob = si->ob;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user