MINOR: args: add new context for servers

We'll have to support fetch expressions and args on server lines for
"usesrc", "usedst", "sni", etc...
This commit is contained in:
Willy Tarreau 2015-07-09 11:39:33 +02:00
parent 53e1a6d317
commit 28d976d5ee
3 changed files with 4 additions and 0 deletions

View File

@ -74,6 +74,7 @@ enum {
ARGC_UIF, /* unique-id-format */ ARGC_UIF, /* unique-id-format */
ARGC_RDR, /* redirect */ ARGC_RDR, /* redirect */
ARGC_CAP, /* capture rule */ ARGC_CAP, /* capture rule */
ARGC_SRV, /* server line */
}; };
/* flags used when compiling and executing regex */ /* flags used when compiling and executing regex */

View File

@ -192,6 +192,8 @@ static inline const char *fmt_directive(const struct proxy *curproxy)
return "redirect"; return "redirect";
case ARGC_CAP: case ARGC_CAP:
return "capture"; return "capture";
case ARGC_SRV:
return "server";
default: default:
return "undefined(please report this bug)"; /* must never happen */ return "undefined(please report this bug)"; /* must never happen */
} }

View File

@ -1125,6 +1125,7 @@ int smp_resolve_args(struct proxy *p)
case ARGC_RDR: where = "in redirect format string in"; break; case ARGC_RDR: where = "in redirect format string in"; break;
case ARGC_CAP: where = "in capture rule in"; break; case ARGC_CAP: where = "in capture rule in"; break;
case ARGC_ACL: ctx = "ACL keyword"; break; case ARGC_ACL: ctx = "ACL keyword"; break;
case ARGC_SRV: where = "in server directive in"; break;
} }
/* set a few default settings */ /* set a few default settings */