Pass the proper size to http_state_run().

This commit is contained in:
Joris Vink 2015-05-06 10:18:25 +02:00
parent 97bd389935
commit 25578d9428
1 changed files with 3 additions and 1 deletions

View File

@ -59,6 +59,8 @@ struct http_state mystates[] = {
{ "REQ_STATE_DONE", request_done },
};
#define mystates_size (sizeof(mystates) / sizeof(mystates[0]))
struct rstate {
struct kore_pgsql sql;
};
@ -77,7 +79,7 @@ page(struct http_request *req)
{
/* Drop into our state machine. */
kore_log(LOG_NOTICE, "page start");
return (http_state_run(mystates, sizeof(mystates), req));
return (http_state_run(mystates, mystates_size, req));
}
/* The initial state, we setup our context and fire off the pgsql query. */