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/cache.c b/src/cache.c
index d736969..ac4c682 100644
--- a/src/cache.c
+++ b/src/cache.c
@@ -1272,7 +1272,7 @@
unsigned int max, total;
uint32_t blksz;
- max = htx_get_max_blksz(htx, channel_htx_recv_max(si_ic(appctx->owner), htx));
+ max = htx_get_max_blksz(htx, channel_htx_recv_max(si_ic(cs_si(appctx->owner)), htx));
if (!max)
return 0;
blksz = ((type == HTX_BLK_HDR || type == HTX_BLK_TLR)
@@ -1315,7 +1315,7 @@
unsigned int max, total, rem_data;
uint32_t blksz;
- max = htx_get_max_blksz(htx, channel_htx_recv_max(si_ic(appctx->owner), htx));
+ max = htx_get_max_blksz(htx, channel_htx_recv_max(si_ic(cs_si(appctx->owner)), htx));
if (!max)
return 0;
@@ -1429,7 +1429,7 @@
{
struct cache_entry *cache_ptr = appctx->ctx.cache.entry;
struct shared_block *first = block_ptr(cache_ptr);
- struct stream_interface *si = appctx->owner;
+ struct stream_interface *si = cs_si(appctx->owner);
struct channel *req = si_oc(si);
struct channel *res = si_ic(si);
struct htx *req_htx, *res_htx;
@@ -2563,7 +2563,7 @@
static int cli_io_handler_show_cache(struct appctx *appctx)
{
struct cache* cache = appctx->ctx.cli.p0;
- struct stream_interface *si = appctx->owner;
+ struct stream_interface *si = cs_si(appctx->owner);
if (cache == NULL) {
cache = LIST_ELEM((caches).n, typeof(struct cache *), list);