CLEANUP: applet: remove the unneeded appctx->owner
This one is the pointer to the conn_stream which is always in the
endpoint that is always present in the appctx, thus it's not needed.
This patch removes it and replaces it with appctx_cs() instead. A
few occurences that were using __cs_strm(appctx->owner) were moved
directly to appctx_strm() which does the equivalent.
diff --git a/src/flt_spoe.c b/src/flt_spoe.c
index f032e83..59db428 100644
--- a/src/flt_spoe.c
+++ b/src/flt_spoe.c
@@ -1137,7 +1137,7 @@
static int
spoe_send_frame(struct appctx *appctx, char *buf, size_t framesz)
{
- struct conn_stream *cs = appctx->owner;
+ struct conn_stream *cs = appctx_cs(appctx);
int ret;
uint32_t netint;
@@ -1163,7 +1163,7 @@
static int
spoe_recv_frame(struct appctx *appctx, char *buf, size_t framesz)
{
- struct conn_stream *cs = appctx->owner;
+ struct conn_stream *cs = appctx_cs(appctx);
int ret;
uint32_t netint;
@@ -1192,8 +1192,8 @@
static int
spoe_wakeup_appctx(struct appctx *appctx)
{
- cs_want_get(appctx->owner);
- cs_rx_endp_more(appctx->owner);
+ cs_want_get(appctx_cs(appctx));
+ cs_rx_endp_more(appctx_cs(appctx));
appctx_wakeup(appctx);
return 1;
}
@@ -1219,7 +1219,7 @@
static void
spoe_release_appctx(struct appctx *appctx)
{
- struct conn_stream *cs = appctx->owner;
+ struct conn_stream *cs = appctx_cs(appctx);
struct spoe_appctx *spoe_appctx = SPOE_APPCTX(appctx);
struct spoe_agent *agent;
struct spoe_context *ctx, *back;
@@ -1339,7 +1339,7 @@
static int
spoe_handle_connect_appctx(struct appctx *appctx)
{
- struct conn_stream *cs = appctx->owner;
+ struct conn_stream *cs = appctx_cs(appctx);
struct spoe_agent *agent = SPOE_APPCTX(appctx)->agent;
char *frame, *buf;
int ret;
@@ -1405,7 +1405,7 @@
static int
spoe_handle_connecting_appctx(struct appctx *appctx)
{
- struct conn_stream *cs = appctx->owner;
+ struct conn_stream *cs = appctx_cs(appctx);
struct spoe_agent *agent = SPOE_APPCTX(appctx)->agent;
char *frame;
int ret;
@@ -1650,7 +1650,7 @@
/* Do not forget to remove processed frame from the output buffer */
if (trash.data)
- co_skip(cs_oc(appctx->owner), trash.data);
+ co_skip(cs_oc(appctx_cs(appctx)), trash.data);
end:
return ret;
}
@@ -1658,7 +1658,7 @@
static int
spoe_handle_processing_appctx(struct appctx *appctx)
{
- struct conn_stream *cs = appctx->owner;
+ struct conn_stream *cs = appctx_cs(appctx);
struct server *srv = objt_server(__cs_strm(cs)->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;
@@ -1781,7 +1781,7 @@
static int
spoe_handle_disconnect_appctx(struct appctx *appctx)
{
- struct conn_stream *cs = appctx->owner;
+ struct conn_stream *cs = appctx_cs(appctx);
struct spoe_agent *agent = SPOE_APPCTX(appctx)->agent;
char *frame, *buf;
int ret;
@@ -1834,7 +1834,7 @@
static int
spoe_handle_disconnecting_appctx(struct appctx *appctx)
{
- struct conn_stream *cs = appctx->owner;
+ struct conn_stream *cs = appctx_cs(appctx);
char *frame;
int ret;
@@ -1899,7 +1899,7 @@
static void
spoe_handle_appctx(struct appctx *appctx)
{
- struct conn_stream *cs = appctx->owner;
+ struct conn_stream *cs = appctx_cs(appctx);
struct spoe_agent *agent;
if (SPOE_APPCTX(appctx) == NULL)