const char *reason;
struct task *task;
} hlua_apphttp; /* used by the Lua HTTP services */
- struct {
- void *ptr; /* private pointer for SPOE filter */
- } spoe; /* used by SPOE filter */
struct {
const char *msg; /* pointer to a persistent message to be returned in CLI_ST_PRINT state */
int severity; /* severity of the message to be returned according to (syslog) rfc5424 */
#define FRAME_HDR_SIZE 32
/* Helper to get SPOE ctx inside an appctx */
-#define SPOE_APPCTX(appctx) ((struct spoe_appctx *)((appctx)->ctx.spoe.ptr))
+#define SPOE_APPCTX(appctx) ((struct spoe_appctx *)((appctx)->svcctx))
/* SPOE filter id. Used to identify SPOE filters */
const char *spoe_filter_id = "SPOE filter";
memset(&spoe_appctx, 0, sizeof(spoe_appctx));
memset(buf, 0, sizeof(buf));
- appctx.ctx.spoe.ptr = &spoe_appctx;
+ appctx.svcctx = &spoe_appctx;
SPOE_APPCTX(&appctx)->max_frame_size = MAX_FRAME_SIZE;
frame = buf+4; /* Reserved the 4 first bytes for the frame size */
memset(&appctx, 0, sizeof(appctx));
memset(&spoe_appctx, 0, sizeof(spoe_appctx));
- appctx.ctx.spoe.ptr = &spoe_appctx;
+ appctx.svcctx = &spoe_appctx;
SPOE_APPCTX(&appctx)->max_frame_size = MAX_FRAME_SIZE;
if (*frame == SPOE_FRM_T_AGENT_DISCON) {
if (spoe_appctx == NULL)
return;
- appctx->ctx.spoe.ptr = NULL;
+ appctx->svcctx = NULL;
agent = spoe_appctx->agent;
SPOE_PRINTF(stderr, "%d.%06d [SPOE/%-15s] %s: appctx=%p\n",
if ((appctx = appctx_new(&spoe_applet, NULL)) == NULL)
goto out_error;
- appctx->ctx.spoe.ptr = pool_zalloc(pool_head_spoe_appctx);
+ appctx->svcctx = pool_zalloc(pool_head_spoe_appctx);
if (SPOE_APPCTX(appctx) == NULL)
goto out_free_appctx;