#define APPCTX_FL_ERROR 0x00000080
#define APPCTX_FL_SHUTDOWN 0x00000100 /* applet was shut down (->release() called if any). No more data exchange with SCs */
#define APPCTX_FL_WANT_DIE 0x00000200 /* applet was running and requested to die */
+#define APPCTX_FL_INOUT_BUFS 0x00000400 /* applet uses its own buffers */
struct appctx;
struct proxy;
}
appctx->sedesc = sedesc;
- if (applet->rcv_buf != NULL && applet->snd_buf != NULL)
- appctx->t->process = task_process_applet;
- else
- appctx->t->process = task_run_applet;
- appctx->t->context = appctx;
appctx->flags = 0;
appctx->inbuf = BUF_NULL;
appctx->outbuf = BUF_NULL;
appctx->to_forward = 0;
+ if (applet->rcv_buf != NULL && applet->snd_buf != NULL) {
+ appctx->t->process = task_process_applet;
+ appctx->flags |= APPCTX_FL_INOUT_BUFS;
+ }
+ else
+ appctx->t->process = task_run_applet;
+ appctx->t->context = appctx;
+
LIST_INIT(&appctx->buffer_wait.list);
appctx->buffer_wait.target = appctx;
appctx->buffer_wait.wakeup_cb = appctx_buf_available;