Commit 5335c721 authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Have listen_socks tell what session step to go to after accept.

parent ba34fd3a
......@@ -139,12 +139,6 @@ typedef struct {
/*--------------------------------------------------------------------*/
enum sess_step {
#define SESS_STEP(l, u) S_STP_##u,
#include "tbl/steps.h"
#undef SESS_STEP
};
enum req_step {
#define REQ_STEP(l, u, arg) R_STP_##u,
#include "tbl/steps.h"
......
......@@ -62,6 +62,12 @@ enum obj_flags {
#undef OBJ_FLAG
};
enum sess_step {
#define SESS_STEP(l, u) S_STP_##u,
#include "tbl/steps.h"
#undef SESS_STEP
};
struct cli;
/**********************************************************************
......
......@@ -39,6 +39,7 @@ struct listen_sock {
int sock;
const char *name;
const struct suckaddr *addr;
enum sess_step first_step;
};
VTAILQ_HEAD(listen_sock_head, listen_sock);
......
......@@ -132,6 +132,7 @@ mac_callback(void *priv, const struct suckaddr *sa)
AN(ls);
ls->sock = -1;
ls->addr = sa;
ls->first_step = S_STP_H1NEWSESS;
fail = mac_opensocket(ls, NULL);
if (ls->sock < 0) {
*(mh->err) = strerror(fail);
......
......@@ -31,6 +31,7 @@
/*lint -save -e525 -e539 */
#ifdef SESS_STEP
SESS_STEP(h1newsess, H1NEWSESS)
SESS_STEP(h1newreq, H1NEWREQ)
SESS_STEP(h1working, H1WORKING)
#endif
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment