MEDIUM: applet: Set the conn-stream as appctx owner instead of the stream-int
Because appctx is now an endpoint of the conn-stream, there is no reason to
still have the stream-interface as appctx owner. Thus, the conn-stream is
now the appctx owner.
diff --git a/src/flt_spoe.c b/src/flt_spoe.c
index 8b2de43..a12d75d 100644
--- a/src/flt_spoe.c
+++ b/src/flt_spoe.c
@@ -1135,7 +1135,7 @@
static int
spoe_send_frame(struct appctx *appctx, char *buf, size_t framesz)
{
- struct stream_interface *si = appctx->owner;
+ struct stream_interface *si = cs_si(appctx->owner);
int ret;
uint32_t netint;
@@ -1161,7 +1161,7 @@
static int
spoe_recv_frame(struct appctx *appctx, char *buf, size_t framesz)
{
- struct stream_interface *si = appctx->owner;
+ struct stream_interface *si = cs_si(appctx->owner);
int ret;
uint32_t netint;
@@ -1190,8 +1190,8 @@
static int
spoe_wakeup_appctx(struct appctx *appctx)
{
- si_want_get(appctx->owner);
- si_rx_endp_more(appctx->owner);
+ si_want_get(cs_si(appctx->owner));
+ si_rx_endp_more(cs_si(appctx->owner));
appctx_wakeup(appctx);
return 1;
}
@@ -1217,7 +1217,7 @@
static void
spoe_release_appctx(struct appctx *appctx)
{
- struct stream_interface *si = appctx->owner;
+ struct stream_interface *si = cs_si(appctx->owner);
struct spoe_appctx *spoe_appctx = SPOE_APPCTX(appctx);
struct spoe_agent *agent;
struct spoe_context *ctx, *back;
@@ -1337,7 +1337,7 @@
static int
spoe_handle_connect_appctx(struct appctx *appctx)
{
- struct stream_interface *si = appctx->owner;
+ struct stream_interface *si = cs_si(appctx->owner);
struct spoe_agent *agent = SPOE_APPCTX(appctx)->agent;
char *frame, *buf;
int ret;
@@ -1403,7 +1403,7 @@
static int
spoe_handle_connecting_appctx(struct appctx *appctx)
{
- struct stream_interface *si = appctx->owner;
+ struct stream_interface *si = cs_si(appctx->owner);
struct spoe_agent *agent = SPOE_APPCTX(appctx)->agent;
char *frame;
int ret;
@@ -1648,7 +1648,7 @@
/* Do not forget to remove processed frame from the output buffer */
if (trash.data)
- co_skip(si_oc(appctx->owner), trash.data);
+ co_skip(si_oc(cs_si(appctx->owner)), trash.data);
end:
return ret;
}
@@ -1656,7 +1656,7 @@
static int
spoe_handle_processing_appctx(struct appctx *appctx)
{
- struct stream_interface *si = appctx->owner;
+ struct stream_interface *si = cs_si(appctx->owner);
struct server *srv = objt_server(si_strm(si)->target);
struct spoe_agent *agent = SPOE_APPCTX(appctx)->agent;
int ret, skip_sending = 0, skip_receiving = 0, active_s = 0, active_r = 0, close_asap = 0;
@@ -1779,7 +1779,7 @@
static int
spoe_handle_disconnect_appctx(struct appctx *appctx)
{
- struct stream_interface *si = appctx->owner;
+ struct stream_interface *si = cs_si(appctx->owner);
struct spoe_agent *agent = SPOE_APPCTX(appctx)->agent;
char *frame, *buf;
int ret;
@@ -1832,7 +1832,7 @@
static int
spoe_handle_disconnecting_appctx(struct appctx *appctx)
{
- struct stream_interface *si = appctx->owner;
+ struct stream_interface *si = cs_si(appctx->owner);
char *frame;
int ret;
@@ -1883,7 +1883,7 @@
next:
/* Do not forget to remove processed frame from the output buffer */
if (trash.data)
- co_skip(si_oc(appctx->owner), trash.data);
+ co_skip(si_oc(cs_si(appctx->owner)), trash.data);
return 0;
stop:
@@ -1897,7 +1897,7 @@
static void
spoe_handle_appctx(struct appctx *appctx)
{
- struct stream_interface *si = appctx->owner;
+ struct stream_interface *si = cs_si(appctx->owner);
struct spoe_agent *agent;
if (SPOE_APPCTX(appctx) == NULL)