Make keep_alive() a tiny function instead of a macro.

This commit is contained in:
Emil Mikulic 2013-04-28 21:01:31 +10:00
parent a9a2aff851
commit d26a2956bf
1 changed files with 5 additions and 3 deletions

View File

@ -1260,9 +1260,11 @@ static char *urldecode(const char *url) {
return out;
}
/* Connection or Keep-Alive header, depending on conn_close */
#define keep_alive(conn) ((conn)->conn_close ? \
"Connection: close\r\n" : keep_alive_field )
/* Returns Connection or Keep-Alive header, depending on conn_close. */
static const char *keep_alive(const struct connection *conn)
{
return (conn->conn_close ? "Connection: close\r\n" : keep_alive_field);
}
/* A default reply for any (erroneous) occasion. */
static void default_reply(struct connection *conn,