Add KORE_HTTP_STATE() helper macro.

defines as KORE_HTTP_STATE(f) (#f, f) so we can get a literal representing
the name of the state function which makes debugging a little easier.
This commit is contained in:
Joris Vink 2018-07-23 06:14:17 +02:00
parent 7f820c96e8
commit a6e662a805
1 changed files with 2 additions and 0 deletions

View File

@ -263,6 +263,8 @@ struct http_request {
TAILQ_ENTRY(http_request) olist;
};
#define KORE_HTTP_STATE(f) { #f, f }
struct http_state {
const char *name;
int (*cb)(struct http_request *);